mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 23:09:40 +02:00
also try to inline 32bit SwapEndian variants, as they're still reasonably simple
git-svn-id: trunk@36304 -
This commit is contained in:
parent
a4c40a51ff
commit
346f040a54
@ -2268,14 +2268,14 @@ function SwapEndian(const AValue: Word): Word;{$ifdef SYSTEMINLINE}inline;{$endi
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function SwapEndian(const AValue: LongInt): LongInt;
|
||||
function SwapEndian(const AValue: LongInt): LongInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
Result := ((AValue shl 8) and $FF00FF00) or ((AValue shr 8) and $00FF00FF);
|
||||
Result := (Result shl 16) or (Result shr 16);
|
||||
end;
|
||||
|
||||
{$ifndef cpujvm}
|
||||
function SwapEndian(const AValue: DWord): DWord;
|
||||
function SwapEndian(const AValue: DWord): DWord;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
Result := ((AValue shl 8) and $FF00FF00) or ((AValue shr 8) and $00FF00FF);
|
||||
Result := (Result shl 16) or (Result shr 16);
|
||||
|
Loading…
Reference in New Issue
Block a user