r200242 - Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
Reid Kleckner
reid at kleckner.net
Mon Jan 27 11:26:39 PST 2014
Author: rnk
Date: Mon Jan 27 13:26:39 2014
New Revision: 200242
URL: http://llvm.org/viewvc/llvm-project?rev=200242&view=rev
Log:
Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
This reverts commit r200233.
The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Driver/arm-cortex-cpus.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=200242&r1=200241&r2=200242&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Jan 27 13:26:39 2014
@@ -3832,15 +3832,14 @@ public:
Features["hwdiv"] = true;
Features["hwdiv-arm"] = true;
Features["crc"] = true;
- } else if (CPU == "cortex-r5" ||
+ } else if (CPU == "cortex-r5" || CPU == "cortex-m3" ||
+ CPU == "cortex-m4" ||
// 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;
}
}
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=200242&r1=200241&r2=200242&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-cortex-cpus.c (original)
+++ cfe/trunk/test/Driver/arm-cortex-cpus.c Mon Jan 27 13:26:39 2014
@@ -158,9 +158,3 @@
// 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
-
More information about the cfe-commits
mailing list