* made SwapEndian(<16 Bit>); inlined

git-svn-id: trunk@13453 -
This commit is contained in:
florian 2009-07-26 13:50:57 +00:00
parent e362e85039
commit 6ff15f46e2

View File

@ -1784,7 +1784,7 @@ end;
{$endif} {$endif}
{$ifndef FPC_SYSTEM_HAS_SWAPENDIAN} {$ifndef FPC_SYSTEM_HAS_SWAPENDIAN}
function SwapEndian(const AValue: SmallInt): SmallInt; function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
{ the extra Word type cast is necessary because the "AValue shr 8" } { the extra Word type cast is necessary because the "AValue shr 8" }
{ is turned into "longint(AValue) shr 8", so if AValue < 0 then } { is turned into "longint(AValue) shr 8", so if AValue < 0 then }
@ -1794,7 +1794,7 @@ function SwapEndian(const AValue: SmallInt): SmallInt;
end; end;
function SwapEndian(const AValue: Word): Word; function SwapEndian(const AValue: Word): Word;{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
Result := Word((AValue shr 8) or (AValue shl 8)); Result := Word((AValue shr 8) or (AValue shl 8));
end; end;
@ -2112,7 +2112,7 @@ function RorByte(Const AValue : Byte): Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
Result:=(AValue shr 1) or (AValue shl 7); Result:=(AValue shr 1) or (AValue shl 7);
end; end;
function RorByte(Const AValue : Byte;Dist : Byte): Byte;{$ifdef SYSTEMINLINE}inline;{$endif} function RorByte(Const AValue : Byte;Dist : Byte): Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
@ -2144,7 +2144,7 @@ function RorWord(Const AValue : Word): Word;{$ifdef SYSTEMINLINE}inline;{$endif}
Result:=(AValue shr 1) or (AValue shl 15); Result:=(AValue shr 1) or (AValue shl 15);
end; end;
function RorWord(Const AValue : Word;Dist : Byte): Word;{$ifdef SYSTEMINLINE}inline;{$endif} function RorWord(Const AValue : Word;Dist : Byte): Word;{$ifdef SYSTEMINLINE}inline;{$endif}
begin begin
Dist:=Dist and 15; Dist:=Dist and 15;