]> granicus.if.org Git - clang/commitdiff
Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
authorReid Kleckner <reid@kleckner.net>
Mon, 27 Jan 2014 19:26:39 +0000 (19:26 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 27 Jan 2014 19:26:39 +0000 (19:26 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200242 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Driver/arm-cortex-cpus.c

index b313ac44b2d36fe65301df6ec34087a2cd3a864d..94c8ea959896a6feaed309613e6be032c49e5a99 100644 (file)
@@ -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;
     }
   }
 
index 80c0f10aa00d7bef1e2338f7b70f4335f5ca2877..ddfbc6e58c90a65d6ea43fc2a8fc296efb6762f3 100644 (file)
 // 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
-