[PATCH] D18086: Fix default processor name for armv6k.

Johannes Schickel via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 07:12:11 PST 2016

LordHoto created this revision.
LordHoto added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

The former processor name "arm1176j-s" does not exist according to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.arm11/index.html and causes issues when actually being used during compilation (I tried to compile libffi 3.2 with clang for old iOS, which defaults to "armv6k", and it failed because invalid instructions were used).

It looks like r246930 did introduce the use of that name. The comments on the diff (D11590) for the revision suggest that it was known that this CPU name is invalid and suggest they removed it. However, the wrong processor name still ended up in the finally committed patch.

I reverted the processor name back to the former default "arm1176jzf-s" and introduced a new entry for "armv6k" without VFP which uses "arm1176jz-s", which are the first processor to support ARMv6k extensions starting from their first revision as far as I can tell from the docs on arm.com.

This sadly causes some regressions in the Clang unit tests. Clang appareantly assumes when you target CPU "arm1176jzf-s" you automatically target architecture "armv6kz". This looks like a sane thing, but now breaks because CPU "arm1176jzf-s" is used for both architectures. As a result, "armv6k" is targetted now when targetting CPU "arm1176jzf-s". I have some patch for Clang which marks the respective unit tests as FIXME and correctly adepts the tests for default processor for "armv6k". I will put it in a diff in case this one makes it.



Index: unittests/ADT/TripleTest.cpp
--- unittests/ADT/TripleTest.cpp
+++ unittests/ADT/TripleTest.cpp
@@ -889,7 +889,7 @@
     llvm::Triple Triple("armv6k-unknown-eabi");
-    EXPECT_EQ("arm1176j-s", Triple.getARMCPUForArch());
+    EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch());
     llvm::Triple Triple("armv6kz-unknown-eabi");
Index: include/llvm/Support/ARMTargetParser.def
--- include/llvm/Support/ARMTargetParser.def
+++ include/llvm/Support/ARMTargetParser.def
@@ -179,7 +179,8 @@
 ARM_CPU_NAME("arm1136j-s", AK_ARMV6, FK_NONE, false, AEK_NONE)
 ARM_CPU_NAME("arm1136jf-s", AK_ARMV6, FK_VFPV2, true, AEK_NONE)
 ARM_CPU_NAME("arm1136jz-s", AK_ARMV6, FK_NONE, false, AEK_NONE)
-ARM_CPU_NAME("arm1176j-s", AK_ARMV6K, FK_NONE, true, AEK_NONE)
+ARM_CPU_NAME("arm1176jz-s", AK_ARMV6K, FK_NONE, false, AEK_NONE)
+ARM_CPU_NAME("arm1176jzf-s", AK_ARMV6K, FK_VFPV2, true, AEK_NONE)
 ARM_CPU_NAME("arm1176jz-s", AK_ARMV6KZ, FK_NONE, false, AEK_NONE)
 ARM_CPU_NAME("mpcore", AK_ARMV6K, FK_VFPV2, false, AEK_NONE)
 ARM_CPU_NAME("mpcorenovfp", AK_ARMV6K, FK_NONE, false, AEK_NONE)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18086.50425.patch
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160311/fe143d34/attachment.bin>

More information about the llvm-commits mailing list