forked from OSchip/llvm-project
Make thumb the default instruction set for v7m and v7em
llvm-svn: 197152
This commit is contained in:
parent
178d0dc95b
commit
8af41b5a21
|
@ -301,7 +301,8 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args,
|
|||
// FIXME: Thumb should just be another -target-feaure, not in the triple.
|
||||
StringRef Suffix =
|
||||
getLLVMArchSuffixForARM(getARMTargetCPU(Args, Triple));
|
||||
bool ThumbDefault = Suffix.startswith("v6m") ||
|
||||
bool ThumbDefault = Suffix.startswith("v6m") || Suffix.startswith("v7m") ||
|
||||
Suffix.startswith("v7em") ||
|
||||
(Suffix.startswith("v7") && getTriple().isOSDarwin());
|
||||
std::string ArchName = "arm";
|
||||
|
||||
|
|
|
@ -71,10 +71,12 @@
|
|||
// RUN: %clang -target arm -march=armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M %s
|
||||
// CHECK-V6M: "-cc1"{{.*}} "-triple" "thumbv6m-{{.*}} "-target-cpu" "cortex-m0"
|
||||
|
||||
// RUN: %clang -target armv7m-apple-darwin -arch armv7m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
|
||||
// RUN: %clang -target armv7m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
|
||||
// RUN: %clang -target arm -march=armv7-m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
|
||||
// CHECK-V7M: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m3"
|
||||
|
||||
// RUN: %clang -target armv7em-apple-darwin -arch armv7em -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
|
||||
// RUN: %clang -target armv7em -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
|
||||
// RUN: %clang -target arm -march=armv7e-m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
|
||||
// CHECK-V7EM: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4"
|
||||
|
||||
// RUN: %clang -target armv6m-apple-darwin -arch armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M-DARWIN %s
|
||||
|
@ -136,10 +138,10 @@
|
|||
// CHECK-CPUV6M: "-cc1"{{.*}} "-triple" "thumbv6m-{{.*}}
|
||||
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7M %s
|
||||
// CHECK-CPUV7M: "-cc1"{{.*}} "-triple" "armv7m-{{.*}}
|
||||
// CHECK-CPUV7M: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}}
|
||||
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7EM %s
|
||||
// CHECK-CPUV7EM: "-cc1"{{.*}} "-triple" "armv7em-{{.*}}
|
||||
// CHECK-CPUV7EM: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}}
|
||||
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
|
||||
|
|
Loading…
Reference in New Issue