r185075 - Add support for passing v8fp options via -mfpu.
Joey Gouly
joey.gouly at arm.com
Thu Jun 27 06:19:54 PDT 2013
Author: joey
Date: Thu Jun 27 08:19:54 2013
New Revision: 185075
URL: http://llvm.org/viewvc/llvm-project?rev=185075&view=rev
Log:
Add support for passing v8fp options via -mfpu.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/arm-mfpu.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=185075&r1=185074&r2=185075&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Jun 27 08:19:54 2013
@@ -3681,7 +3681,7 @@ public:
bool Enabled) const {
if (Name == "soft-float" || Name == "soft-float-abi" ||
Name == "vfp2" || Name == "vfp3" || Name == "vfp4" || Name == "neon" ||
- Name == "d16" || Name == "neonfp") {
+ Name == "d16" || Name == "neonfp" || Name == "v8fp") {
Features[Name] = Enabled;
} else
return false;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=185075&r1=185074&r2=185075&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jun 27 08:19:54 2013
@@ -590,6 +590,14 @@ static void addFPUArgs(const Driver &D,
CmdArgs.push_back("+vfp3");
CmdArgs.push_back("-target-feature");
CmdArgs.push_back("-neon");
+ } else if (FPU == "fp-armv8") {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("+v8fp");
+ } else if (FPU == "neon-fp-armv8") {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("+v8fp");
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("+neon");
} else if (FPU == "neon") {
CmdArgs.push_back("-target-feature");
CmdArgs.push_back("+neon");
Modified: cfe/trunk/test/Driver/arm-mfpu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-mfpu.c?rev=185075&r1=185074&r2=185075&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-mfpu.c (original)
+++ cfe/trunk/test/Driver/arm-mfpu.c Thu Jun 27 08:19:54 2013
@@ -46,3 +46,12 @@
// RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s
// CHECK-SOFT-FLOAT: "-target-feature" "-neon"
+
+// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
+// CHECK-FP-ARMV8: "-target-feature" "+v8fp"
+
+// RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s
+// CHECK-NEON-FP-ARMV8: "-target-feature" "+v8fp"
+// CHECK-NEON-FP-ARMV8: "-target-feature" "+neon"
More information about the cfe-commits
mailing list