[PATCH] D38227: [Builtins] ARM: Fix assembling files in thumb mode.

Manoj Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 12:55:51 PDT 2017


manojgupta added a comment.

Thanks Peter,
I'll split out msr & .p2align into separate patches.



================
Comment at: lib/builtins/arm/aeabi_cdcmp.S:54-56
+#elif defined(USE_THUMB_2)
+        mov ip, #APSR_C
+        msr CPSR_f, ip
----------------
peter.smith wrote:
> manojgupta wrote:
> > Please review this change and the one below since I am not much of an ARM assembly expert.
> I think that this would be better split out into a separate patch, potentially dependent on this one. 
> 
> I think that you don't need an extra case for Thumb2. __ARM_ARCH_7M__ and __ARM_ARCH_7EM__ only support Thumb 2 so I think all you need to do is replace that condition with USE_THUMB2.
> 
> Apologies I've not got an assembler at hand to check.
I can't build in thumb without this change since clang complains about the illegal operand to msr instruction. But agree that this should be a separate patch.


https://reviews.llvm.org/D38227





More information about the llvm-commits mailing list