summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/arm/aeabi_cfcmp.S')
-rw-r--r--compiler-rt/lib/builtins/arm/aeabi_cfcmp.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S b/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
index 7bc84073f6f..c5fee6b6a08 100644
--- a/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
+++ b/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
@@ -46,9 +46,12 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq)
pop {r0-r3, lr}
// NaN has been ruled out, so __aeabi_cfcmple can't trap
+ // Use "it ne" + unconditional branch to guarantee a supported relocation if
+ // __aeabi_cfcmple is in a different section for some builds.
+ IT(ne)
bne __aeabi_cfcmple
-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
+#if defined(USE_THUMB_2)
mov ip, #APSR_C
msr APSR_nzcvq, ip
#else
OpenPOWER on IntegriCloud