r232469 - [ARM] Add support for ARMV6K subtarget (Clang)
Renato Golin
renato.golin at linaro.org
Tue Mar 17 04:55:43 PDT 2015
Author: rengolin
Date: Tue Mar 17 06:55:43 2015
New Revision: 232469
URL: http://llvm.org/viewvc/llvm-project?rev=232469&view=rev
Log:
[ARM] Add support for ARMV6K subtarget (Clang)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the Clang
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/arm-cortex-cpus.c
cfe/trunk/test/Driver/arm-mfpu.c
cfe/trunk/test/Driver/biarch.c
cfe/trunk/test/Driver/darwin-version.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Mar 17 06:55:43 2015
@@ -4215,8 +4215,9 @@ public:
.Cases("arm10e", "arm1020e", "arm1022e", "5TE")
.Cases("xscale", "iwmmxt", "5TE")
.Case("arm1136j-s", "6J")
- .Cases("arm1176jz-s", "arm1176jzf-s", "6ZK")
- .Cases("arm1136jf-s", "mpcorenovfp", "mpcore", "6K")
+ .Case("arm1136jf-s", "6")
+ .Cases("mpcorenovfp", "mpcore", "6K")
+ .Cases("arm1176jz-s", "arm1176jzf-s", "6K")
.Cases("arm1156t2-s", "arm1156t2f-s", "6T2")
.Cases("cortex-a5", "cortex-a7", "cortex-a8", "7A")
.Cases("cortex-a9", "cortex-a12", "cortex-a15", "cortex-a17", "krait",
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Mar 17 06:55:43 2015
@@ -5561,8 +5561,9 @@ const char *arm::getLLVMArchSuffixForARM
.Cases("arm9e", "arm926ej-s", "arm946e-s", "v5e")
.Cases("arm966e-s", "arm968e-s", "arm10e", "v5e")
.Cases("arm1020e", "arm1022e", "xscale", "iwmmxt", "v5e")
- .Cases("arm1136j-s", "arm1136jf-s", "arm1176jz-s", "v6")
- .Cases("arm1176jzf-s", "mpcorenovfp", "mpcore", "v6")
+ .Cases("arm1136j-s", "arm1136jf-s", "v6")
+ .Cases("arm1176jz-s", "arm1176jzf-s", "v6k")
+ .Cases("mpcorenovfp", "mpcore", "v6k")
.Cases("arm1156t2-s", "arm1156t2f-s", "v6t2")
.Cases("cortex-a5", "cortex-a7", "cortex-a8", "v7")
.Cases("cortex-a9", "cortex-a12", "cortex-a15", "cortex-a17", "krait", "v7")
@@ -5583,7 +5584,7 @@ void arm::appendEBLinkFlags(const ArgLis
StringRef Suffix = getLLVMArchSuffixForARM(getARMCPUForMArch(Args, Triple));
const char *LinkFlag = llvm::StringSwitch<const char *>(Suffix)
.Cases("v4", "v4t", "v5", "v5e", nullptr)
- .Cases("v6", "v6t2", nullptr)
+ .Cases("v6", "v6k", "v6t2", nullptr)
.Default("--be8");
if (LinkFlag)
Modified: cfe/trunk/test/Driver/arm-cortex-cpus.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-cortex-cpus.c?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-cortex-cpus.c (original)
+++ cfe/trunk/test/Driver/arm-cortex-cpus.c Tue Mar 17 06:55:43 2015
@@ -56,8 +56,16 @@
// CHECK-V6Z: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1176jzf-s"
// FIXME %clang -target armv6z -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z-THUMB %s
-// FIXME %clang -target arm arch=armv6z -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z-THUMB %s
-// CHECK-V6Z-THUMB: "-cc1"{{.*}} "-triple" "thumbv6-{{.*}} "-target-cpu" "arm1176jzfs"
+// FIXME %clang -target arm -march=armv6z -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z-THUMB %s
+// CHECK-V6Z-THUMB: "-cc1"{{.*}} "-triple" "thumbv6-{{.*}} "-target-cpu" "arm1176jzf-s"
+
+// RUN: %clang -target armv6k -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6K %s
+// RUN: %clang -target arm -march=armv6k -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6K %s
+// CHECK-V6K: "-cc1"{{.*}} "-triple" "armv6k-{{.*}} "-target-cpu" "arm1176jzf-s"
+
+// RUN: %clang -target armv6k -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6K-THUMB %s
+// RUN: %clang -target arm -march=armv6k -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6K-THUMB %s
+// CHECK-V6K-THUMB: "-cc1"{{.*}} "-triple" "thumbv6k-{{.*}} "-target-cpu" "arm1176jzf-s"
// RUN: %clang -target armv6t2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2 %s
// RUN: %clang -target arm -march=armv6t2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2 %s
@@ -162,7 +170,22 @@
// RUN: %clang -target arm -march=armbogusv6 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS %s
// CHECK-BOGUS: "-cc1"{{.*}} "-triple" "armv4t-{{.*}} "-target-cpu" "arm7tdmi"
// RUN: %clang -target arm---eabihf -march=armbogusv7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-HF %s
-// CHECK-BOGUS-HF: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1176jzf-s"
+// CHECK-BOGUS-HF: "-cc1"{{.*}} "-triple" "armv6k-{{.*}} "-target-cpu" "arm1176jzf-s"
+
+// ================== Check default Architecture on each ARM11 CPU
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1136j-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6 %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1136jf-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6 %s
+// CHECK-CPUV6: "-cc1"{{.*}} "-triple" "armv6-{{.*}}
+
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1176jz-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6K %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1176jzf-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6K %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=mpcore -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6K %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=mpcorenovfp -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6K %s
+// CHECK-CPUV6K: "-cc1"{{.*}} "-triple" "armv6k-{{.*}}
+
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1156t2-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6T2 %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1156t2f-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6T2 %s
+// CHECK-CPUV6T2: "-cc1"{{.*}} "-triple" "armv6t2-{{.*}}
// ================== Check default Architecture on each Cortex CPU
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
Modified: cfe/trunk/test/Driver/arm-mfpu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-mfpu.c?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-mfpu.c (original)
+++ cfe/trunk/test/Driver/arm-mfpu.c Tue Mar 17 06:55:43 2015
@@ -141,7 +141,7 @@
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-HF %s
-// CHECK-HF: "-target-cpu" "arm1136jf-s"
+// CHECK-HF: "-target-cpu" "arm1176jzf-s"
// RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \
// RUN: | FileCheck --check-prefix=ASM %s
Modified: cfe/trunk/test/Driver/biarch.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/biarch.c?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/test/Driver/biarch.c (original)
+++ cfe/trunk/test/Driver/biarch.c Tue Mar 17 06:55:43 2015
@@ -11,7 +11,7 @@
// RUN: grep '"-cc1" "-triple" "x86_64--netbsd"' %t
// RUN: %clang -target armv6--netbsd-eabihf -m32 %s -### 2> %t
-// RUN: grep '"-cc1" "-triple" "armv6--netbsd-eabihf"' %t
+// RUN: grep '"-cc1" "-triple" "armv6k--netbsd-eabihf"' %t
// RUN: %clang -target sparcv9--netbsd -m32 %s -### 2> %t
// RUN: grep '"-cc1" "-triple" "sparc--netbsd"' %t
Modified: cfe/trunk/test/Driver/darwin-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-version.c?rev=232469&r1=232468&r2=232469&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-version.c (original)
+++ cfe/trunk/test/Driver/darwin-version.c Tue Mar 17 06:55:43 2015
@@ -1,15 +1,15 @@
// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX %s
-// CHECK-VERSION-OSX: "armv6-apple-macosx10.5.0"
+// CHECK-VERSION-OSX: "armv6k-apple-macosx10.5.0"
// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.0 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s
-// CHECK-VERSION-IOS2: "armv6-apple-ios2.0.0"
+// CHECK-VERSION-IOS2: "armv6k-apple-ios2.0.0"
// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.2 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS22 %s
-// CHECK-VERSION-IOS22: "armv6-apple-ios2.2.0"
+// CHECK-VERSION-IOS22: "armv6k-apple-ios2.2.0"
// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=3.0 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS3 %s
-// CHECK-VERSION-IOS3: "armv6-apple-ios3.0.0"
+// CHECK-VERSION-IOS3: "armv6k-apple-ios3.0.0"
// RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -c %s -### 2>&1 | \
@@ -46,4 +46,4 @@
// RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \
// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS231 %s
-// CHECK-VERSION-IOS231: "armv6-apple-ios2.3.1"
+// CHECK-VERSION-IOS231: "armv6k-apple-ios2.3.1"
More information about the cfe-commits
mailing list