Modify fixup of BL/BLX instructions and ensure proper form is generated.

git-svn-id: branches/laksen/armiw@29260 -
This commit is contained in:
Jeppe Johansen 2014-12-11 21:50:44 +00:00
parent 284a4d9dd7
commit 0b5bcdf439
2 changed files with 6 additions and 6 deletions

View File

@ -123,17 +123,17 @@ imm \x1\x0B ARM32,ARMv4
immshifter \x1\x0B ARM32,ARMv4
[BLX]
mem32 \x28\xFA ARM32,ARMv4
imm \x28\xFA ARM32,ARMv4
immshifter \x28\xFA ARM32,ARMv4
reg32 \3\x01\x2F\xFF\x30 ARM32,ARMv4
mem32 \x28\xA ARM32,ARMv5T
imm \x28\xA ARM32,ARMv5T
immshifter \x28\xA ARM32,ARMv5T
reg32 \3\x01\x2F\xFF\x30 ARM32,ARMv5T
[BKPTcc]
imm \x31\x1\x20\x70 ARM32,ARMv5T
immshifter \x31\x1\x20\x70 ARM32,ARMv5T
[BXcc]
reg32 \3\x01\x2F\xFF\x10 ARM32,ARMv4
reg32 \3\x01\x2F\xFF\x10 ARM32,ARMv4T
[CDP]
reg8,reg8 \300\1\x10\101 ARM32,ARMv4

View File

@ -671,7 +671,7 @@ implementation
begin
if (reltyp=R_ARM_CALL) then
{ change BL to BLX, dest bit 1 goes to instruction bit 24 }
address:=(address and $FE000000) or (((tmp-curloc) and 2) shl 23) or $10000000
address:=(address and $FE000000) or (((tmp-curloc) and 2) shl 23) or $F0000000
else
InternalError(2014092001);
end;