[compiler-rt] r314284 - [Builtins] ARM: Fix msr assembly instruction use for Thumb2.

Manoj Gupta via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 02:29:57 PDT 2017


Author: manojgupta
Date: Wed Sep 27 02:29:57 2017
New Revision: 314284

URL: http://llvm.org/viewvc/llvm-project?rev=314284&view=rev
Log:
[Builtins] ARM: Fix msr assembly instruction use for Thumb2.

Summary:
MSR instruction in Thumb2 does not support immediate operand.
Fix this by moving the condition for V7-M to Thumb2 since V7-M support
Thumb2 only. With this change, aeabi_cfcmp.s and aeabi_cdcmp.S files can
be assembled in Thumb2 mode. (This is split out from the review D38227).

Reviewers: compnerd, peter.smith, srhines, weimingz, rengolin, kristof.beyls

Reviewed By: compnerd

Subscribers: aemerson, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D38268

Modified:
    compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S
    compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S

Modified: compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S?rev=314284&r1=314283&r2=314284&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S Wed Sep 27 02:29:57 2017
@@ -48,7 +48,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmp
         // NaN has been ruled out, so __aeabi_cdcmple can't trap
         bne __aeabi_cdcmple
 
-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
+#if defined(USE_THUMB_2)
         mov ip, #APSR_C
         msr APSR_nzcvq, ip
 #else

Modified: compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S?rev=314284&r1=314283&r2=314284&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S Wed Sep 27 02:29:57 2017
@@ -48,7 +48,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp
         // NaN has been ruled out, so __aeabi_cfcmple can't trap
         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




More information about the llvm-commits mailing list