summaryrefslogtreecommitdiff
path: root/rtl/arm
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-12-29 13:32:21 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-12-29 13:32:21 +0000
commit7a7ccda240a1776e97d293f62b2f377bc1100b07 (patch)
treee7e51cb612be5dd2526728b0b8efc2c64f3a5cbd /rtl/arm
parenta6129255c30b4a3bb441c3a5dd95286dd96dcbc4 (diff)
downloadfpc-7a7ccda240a1776e97d293f62b2f377bc1100b07.tar.gz
* do not generate blx instructions, the generation of blx instead of bl was introduced some years ago but today it proves to be wrong: if necessary, the linker converts the bl into a blx, this is also how gcc and clang handle it
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@32788 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/arm')
-rw-r--r--rtl/arm/arm.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/rtl/arm/arm.inc b/rtl/arm/arm.inc
index cf6e3ec588..a163e2dc86 100644
--- a/rtl/arm/arm.inc
+++ b/rtl/arm/arm.inc
@@ -547,11 +547,14 @@ asm
{$endif}
stmfd sp!, {r1, lr}
sub r0, r1, #8
-{$if defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
- blx InterLockedDecrement
-{$else defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
+
+// We use always bl, as newer binutils apparently never translate blx into bl
+// {$if defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
+// blx InterLockedDecrement
+// {$else defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
bl InterLockedDecrement
-{$endif defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
+// {$endif defined(CPUARM_HAS_BLX_LABEL) and not(defined(WINCE))}
+
// InterLockedDecrement is a nice guy and sets the z flag for us
// if the reference count dropped to 0
ldmnefd sp!, {r1, pc}