mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 15:09:20 +02:00
* stub out assembly functions for non-x86 platforms
git-svn-id: trunk@44955 -
This commit is contained in:
parent
aa1c1174e6
commit
90040983b6
@ -8350,10 +8350,12 @@ end;
|
|||||||
|
|
||||||
function RtlUshortByteSwap(Source: USHORT): USHORT;
|
function RtlUshortByteSwap(Source: USHORT): USHORT;
|
||||||
asm
|
asm
|
||||||
|
{$if defined(cpux86_64) or defined(cpui386)}
|
||||||
{$ifdef cpux86_64}
|
{$ifdef cpux86_64}
|
||||||
mov CX, AX
|
mov CX, AX
|
||||||
{$endif cpux86_64}
|
{$endif cpux86_64}
|
||||||
rol AX, 08h
|
rol AX, 08h
|
||||||
|
{$endif cpux86_64 or cpui386}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(* Own function to swap bytes in 32bit values
|
(* Own function to swap bytes in 32bit values
|
||||||
@ -8367,10 +8369,12 @@ asm
|
|||||||
// This is not written as mnemonics to be compatible with D4!
|
// This is not written as mnemonics to be compatible with D4!
|
||||||
db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
|
db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
|
||||||
{$else}
|
{$else}
|
||||||
|
{$if defined(cpux86_64) or defined(cpui386)}
|
||||||
{$ifdef cpux86_64}
|
{$ifdef cpux86_64}
|
||||||
mov ECX, EAX
|
mov ECX, EAX
|
||||||
{$endif cpux86_64}
|
{$endif cpux86_64}
|
||||||
bswap EAX // .. but bswap EAX is also 64-bit!!! 0F C8 isn't.
|
bswap EAX // .. but bswap EAX is also 64-bit!!! 0F C8 isn't.
|
||||||
|
{$endif cpux86_64 or cpui386}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
(*
|
(*
|
||||||
|
Loading…
Reference in New Issue
Block a user