index c137e1d1386823beaaeefdd0d2aec47e21d5c93e..1fb47dd66f3005112c7056073fa77f3788e6909f 100644 (file)
Result := PByte(@W)^ = $FF;
end;
Result := PByte(@W)^ = $FF;
end;
+(* Vampimp wrongly use swaps for converting big-endian to little-endian anywhere *)
+{$IF DEFINED(FPC_LITTLE_ENDIAN)}
function SwapEndianWord(Value: Word): Word;
{$IF Defined(USE_ASM) and (not Defined(USE_INLINE))}
asm
function SwapEndianWord(Value: Word): Word;
{$IF Defined(USE_ASM) and (not Defined(USE_INLINE))}
asm
end;
end;
{$ENDIF}
end;
end;
{$ENDIF}
+{$ELSEIF DEFINED(FPC_BIG_ENDIAN)}
+function SwapEndianWord(Value: Word): Word;
+begin
+ Result := Value
+end;
+
+procedure SwapEndianWord(P: PWordArray; Count: LongInt);
+begin
+end;
+
+function SwapEndianLongWord(Value: LongWord): LongWord;
+begin
+ Result := Value
+end;
+
+procedure SwapEndianLongWord(P: PLongWord; Count: LongInt);
+begin
+end;
+{$ELSE}
+ {$ERROR Unsupported endianness!}
+{$ENDIF}
type
TCrcTable = array[Byte] of LongWord;
type
TCrcTable = array[Byte] of LongWord;