forked from OSchip/llvm-project
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm
llvm-svn: 200233
This commit is contained in:
parent
1a2292614c
commit
1c66c3a7f2
|
@ -3832,14 +3832,15 @@ public:
|
|||
Features["hwdiv"] = true;
|
||||
Features["hwdiv-arm"] = true;
|
||||
Features["crc"] = true;
|
||||
} else if (CPU == "cortex-r5" || CPU == "cortex-m3" ||
|
||||
CPU == "cortex-m4" ||
|
||||
} else if (CPU == "cortex-r5" ||
|
||||
// Enable the hwdiv extension for all v8a AArch32 cores by
|
||||
// default.
|
||||
ArchName == "armv8a" || ArchName == "armv8" ||
|
||||
ArchName == "thumbv8a" || ArchName == "thumbv8") {
|
||||
Features["hwdiv"] = true;
|
||||
Features["hwdiv-arm"] = true;
|
||||
} else if (CPU == "cortex-m3" || CPU == "cortex-m4") {
|
||||
Features["hwdiv"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,3 +158,9 @@
|
|||
// RUN: %clang -target arm -mcpu=cortex-a53 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
|
||||
// RUN: %clang -target arm -mcpu=cortex-a57 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
|
||||
// CHECK-CPUV8A-THUMB: "-cc1"{{.*}} "-triple" "thumbv8-{{.*}}
|
||||
|
||||
// ================== Check that Cortex-M cores don't enable hwdiv-arm (and don't emit Tag_DIV_use)
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -S %s -o - | FileCheck -check-prefix=CHECK-HWDIV-ARM %s
|
||||
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -S %s -o - | FileCheck -check-prefix=CHECK-HWDIV-ARM %s
|
||||
// CHECK-HWDIV-ARM-NOT: .eabi_attribute 44
|
||||
|
||||
|
|
Loading…
Reference in New Issue