This patch enables soft float support for ppc32 architecture and fixes the ABI for variadic functions. This is first in set of patches for soft float support in LLVM.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
02.10.2015, 00:00, "Alex Rosenberg via cfe-commits" <cfe-commits@lists.llvm.org>:
alexr added a subscriber: alexr.
alexr added a comment.PowerPC has floating point hardware by definition. Is this some new variant?
Some cores from ppc400 series do not have hardware FP (for example, ppc 405)
include/clang/Basic/TargetInfo.h | ||
---|---|---|
688 ↗ | (On Diff #36763) | Instead of adding this function, please use the same mechanism as X86_32TargetCodeGenInfo and X86_32ABIInfo to feed the soft-float abi information through. |
lib/Basic/Targets.cpp | ||
877 ↗ | (On Diff #36763) | Add spaces after { and before }. |
1072 ↗ | (On Diff #36763) | This check can be part of the loop above. |
lib/Driver/Tools.cpp | ||
1372 ↗ | (On Diff #36763) | Unless there is a good reason to consider all unknown strings equivalent to "hard", please produce an error (and an associated test case). |
test/Driver/ppc-features.cpp | ||
18 ↗ | (On Diff #36763) | Also add a test case with -mhard-float, and both -msoft-float and -mhard-float in different orders. |
Can you please make sure we produce some sensible error should someone try to use soft float with ppc64 (since we don't support that), and add an associated test.
lib/Driver/Tools.h | ||
---|---|---|
739 ↗ | (On Diff #38888) | We don't seem to support (or even accept) SoftFP. Given that, either remove it from the enum or add support for it. |
742 ↗ | (On Diff #38888) | Unindent this and ppc::FloatABI -> FloatABI |
lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
3421 ↗ | (On Diff #40143) | Line too long. |
lib/Driver/Tools.cpp | ||
1353 ↗ | (On Diff #40143) | Remove this FIXME. It is not clear this will ever be supported (is there actually ppc64 hardware without an FP unit)? |
1362 ↗ | (On Diff #40143) | Don't introduce a new error for this. Just reuse the diag::err_drv_invalid_mfloat_abi error. |
lib/Driver/Tools.cpp | ||
---|---|---|
1439 ↗ | (On Diff #41736) | I'm planning to support soft float for ppc64. At this moment I don't know name of ppc64 hardware without FP unit. I know that gcc supports soft float for ppc64. |
One minor comment, otherwise LGTM.
lib/Driver/Tools.cpp | ||
---|---|---|
1477 ↗ | (On Diff #41736) | Don't need the { } here. |
lib/Driver/Tools.cpp | ||
---|---|---|
1477 ↗ | (On Diff #41736) | We don't seem to have a specific style guideline *mandating* the uses of braces around even single-line statements, but please don't *discourage* them. |
lib/Driver/Tools.cpp | ||
---|---|---|
1477 ↗ | (On Diff #41736) | I don't believe this represents the current consensus convention on this matter. We do actively discourage use of unnecessary braces for ifs, fors, etc. The exception being that a series of ifs and elses should have braces for all of them if any of them need them. I often point people at the examples here as representative: http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return You're right, however, we don't formally dictate this policy in our coding standards. Do you actively dislike this viewpoint? |
lib/Driver/Tools.cpp | ||
---|---|---|
1477 ↗ | (On Diff #41736) | The coding style document uses both styles fairly interchangeably; I would not say it states a consensus. And yes, I actively encourage people to add braces in code reviews. |
lib/Driver/Tools.cpp | ||
---|---|---|
1477 ↗ | (On Diff #41736) | Fair enough; Strahinja, please keep the braces :-) |