mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 23:48:15 +02:00
Fix ARM SwapEndian on armv6+ for compilation with FPC 2.6
We're currently using rev for armv6+, but FPC 2.6 could not handle the instruction. So if somebody wants to build trunk it can't be for armv6+. We'll circumvent the problem by always using the the generic code when build with FPC 2.6. git-svn-id: trunk@22003 -
This commit is contained in:
parent
291157330e
commit
e4a719fcff
@ -826,7 +826,7 @@ is bigger than the gain of the optimized function.
|
||||
function AsmSwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inline;{$endif};assembler;nostackframe;
|
||||
asm
|
||||
// We're starting with 4321
|
||||
{$if defined(cpuarmv3) or defined(cpuarmv4) or defined(cpuarmv5)}
|
||||
{$if defined(cpuarmv3) or defined(cpuarmv4) or defined(cpuarmv5) or defined(VER2_6)}
|
||||
mov r0, r0, shl #16 // Shift to make that 2100
|
||||
mov r0, r0, ror #24 // Rotate to 1002
|
||||
orr r0, r0, r0 shr #16 // Shift and combine into 0012
|
||||
@ -864,7 +864,7 @@ end;
|
||||
|
||||
function SwapEndian(const AValue: Int64): Int64; assembler; nostackframe;
|
||||
asm
|
||||
{$if defined(cpuarmv3) or defined(cpuarmv4) or defined(cpuarmv5)}
|
||||
{$if defined(cpuarmv3) or defined(cpuarmv4) or defined(cpuarmv5) or defined(VER2_6)}
|
||||
mov ip, r1
|
||||
|
||||
// We're starting with r0 = $87654321
|
||||
|
Loading…
Reference in New Issue
Block a user