[PATCH] Add support for v8fp to -mfpu
Joey Gouly
joey.gouly at arm.com
Thu Jun 27 04:20:28 PDT 2013
This adds support for -mfpu=fp=armv8 and neon-fp-armv8. These are the same options as GCC.
http://llvm-reviews.chandlerc.com/D1054
Files:
lib/Basic/Targets.cpp
lib/Driver/Tools.cpp
test/Driver/arm-mfpu.c
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -3681,7 +3681,7 @@
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;
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -590,6 +590,14 @@
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");
Index: test/Driver/arm-mfpu.c
===================================================================
--- test/Driver/arm-mfpu.c
+++ test/Driver/arm-mfpu.c
@@ -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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1054.1.patch
Type: text/x-patch
Size: 2009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130627/ceb1650e/attachment.bin>
More information about the cfe-commits
mailing list