]> granicus.if.org Git - clang/commitdiff
Add additional arguments for -mfpu options
authorRichard Barton <richard.barton@arm.com>
Fri, 28 Nov 2014 20:39:59 +0000 (20:39 +0000)
committerRichard Barton <richard.barton@arm.com>
Fri, 28 Nov 2014 20:39:59 +0000 (20:39 +0000)
Add neon-vfpv3 to allow specifying both at the same time. This is not an
option that GCC supports, but follows the same track and should be
non-controversial.

Change-Id: Id9ec157c835937d7d11ad0f49dbe5171fac17658

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

lib/Driver/Tools.cpp
test/Driver/arm-mfpu.c

index 96a4b43ab5c945cdd991a34ee1e2805488d9a63d..067efe65d59f3e7c4751e3b1e62d6dc7938e2844 100644 (file)
@@ -589,6 +589,9 @@ static void getARMFPUFeatures(const Driver &D, const Arg *A,
     Features.push_back("+crypto");
   } else if (FPU == "neon") {
     Features.push_back("+neon");
+  } else if (FPU == "neon-vfpv3") {
+    Features.push_back("+vfpv3");
+    Features.push_back("+neon");
   } else if (FPU == "neon-vfpv4") {
     Features.push_back("+neon");
     Features.push_back("+vfpv4");
index d1454ad2353673a121e40b53ff9ad4f319f52f46..06e736415819f844b59bdea32a337338d158db6d 100644 (file)
 // RUN:   | FileCheck --check-prefix=CHECK-NEON %s
 // CHECK-NEON: "-target-feature" "+neon"
 
+// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s
+// CHECK-NEON-VFPV3: "-target-feature" "+vfpv3"
+// CHECK-NEON-VFPV3: "-target-feature" "+neon"
+
 // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s
 // CHECK-NEON-VFPV4: "-target-feature" "+neon"