[PATCH] D13351: [Power PC] add soft float support for ppc32
hfinkel@anl.gov via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 17:13:51 PDT 2015
hfinkel added inline comments.
================
Comment at: include/clang/Basic/TargetInfo.h:688
@@ -687,1 +687,3 @@
+ virtual bool isSoftFloatABI() const {
+ return false;
----------------
Instead of adding this function, please use the same mechanism as X86_32TargetCodeGenInfo and X86_32ABIInfo to feed the soft-float abi information through.
================
Comment at: lib/Basic/Targets.cpp:877
@@ -875,3 +876,3 @@
-
+ bool isSoftFloatABI() const override {return IsSoftFloat;}
StringRef getABI() const override { return ABI; }
----------------
Add spaces after { and before }.
================
Comment at: lib/Basic/Targets.cpp:1072
@@ -1070,1 +1071,3 @@
+ auto Feature = std::find(Features.begin(), Features.end(), "+soft-float");
+ if (Feature != Features.end()) {
----------------
This check can be part of the loop above.
================
Comment at: lib/Driver/Tools.cpp:1372
@@ +1371,3 @@
+ if (FloatABI != "soft" && FloatABI != "hard") {
+ FloatABI = "hard";
+ }
----------------
Unless there is a good reason to consider all unknown strings equivalent to "hard", please produce an error (and an associated test case).
================
Comment at: test/Driver/ppc-features.cpp:18
@@ -15,1 +17,3 @@
+// CHECK-SOFTFLOAT: "-target-feature" "+soft-float"
+
// CHECK: invalid argument '-faltivec' only allowed with 'ppc/ppc64/ppc64le'
----------------
Also add a test case with -mhard-float, and both -msoft-float and -mhard-float in different orders.
Also add test cases with -mfloat-abi=X
http://reviews.llvm.org/D13351
More information about the cfe-commits
mailing list