[fpc-pascal] IFDEF usage in x86_64's SwapEndian() implementation
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Wed Mar 30 11:09:02 CEST 2016
Hi,
Here is the x86_64's SwapEndian() function implementation.
=============[ src/rtl/x86_64/x86_64.inc ]====================
function SwapEndian(const AValue: DWord): DWord; assembler; nostackframe;
asm
{$ifdef win64}
movl %ecx, %eax
{$else win64}
movl %edi, %eax
{$endif win64}
bswap %eax
end;
=============================================
Surely the usage of IFDEF WIN64 is not 100% correct or accurate. Should
the above not rather read IFDEF CPU64?
Regards,
- Graeme -
More information about the fpc-pascal
mailing list