[compiler-rt] r314284 - [Builtins] ARM: Fix msr assembly instruction use for Thumb2.
Juergen Ributzka via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 11:32:38 PDT 2017
[+Tim]
> On Sep 27, 2017, at 11:14 AM, Manoj Gupta <manojgupta at google.com> wrote:
>
> I don't know much about armv7k. But adding -marm to the command line fixes the error.
> clang -O2 -g -DNDEBUG -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -arch armv7k -MMD -MT aeabi_cdcmp.S.o -MF aeabi_cdcmp.S.o.d -o aeabi_cdcmp.S.o -c aeabi_cdcmp.S -target armv7k-watchos // This fails
> clang -O2 -g -DNDEBUG -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -arch armv7k -MMD -MT aeabi_cdcmp.S.o -MF aeabi_cdcmp.S.o.d -o aeabi_cdcmp.S.o -c aeabi_cdcmp.S -target armv7k-watchos -marm // This works
>
> This makes me think that the using armv7k target defaults to thumb but it wants compilation to be done in ARM mode for the builtins?
>
> Thanks,
> Manoj
>
>
>
> On Wed, Sep 27, 2017 at 10:46 AM, Juergen Ributzka <juergen at ributzka.de <mailto:juergen at ributzka.de>> wrote:
> I think this broke Green Dragon. Could you please take a look?
>
> http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_build/39186/consoleFull#-187600398149ba4694-19c4-4d7e-bec5-911270d8a58c <http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_build/39186/consoleFull#-187600398149ba4694-19c4-4d7e-bec5-911270d8a58c>
>
> Thanks
>
> Cheers,
> Juergen
>
> On Wed, Sep 27, 2017 at 2:29 AM, Manoj Gupta via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> Author: manojgupta
> Date: Wed Sep 27 02:29:57 2017
> New Revision: 314284
>
> URL: http://llvm.org/viewvc/llvm-project?rev=314284&view=rev <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 <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 <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 <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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170927/f676b3f3/attachment.html>
More information about the llvm-commits
mailing list