[WIP] PPC/PPC64: Fix ABI errors.#1680
Conversation
|
This is not yet perfect. It fixes some errors but not all. Especially it is not possible to compile LDC 1.1.0 with this version. |
Issue ldc-developers#1652 seems to be caused by ABI errors in the bootstrap compiler. This PR updates the PPC/PPC64 ABI to conform to clang/gcc output.
|
Is the omission of |
|
This is what clang seems to do. But I can check it. |
|
IIRC, clang also does obsolete integer rewrites for System V. It's just that a LL struct with a single int/pointer is normally passed/returned identically to a rewritten integer. Omitting the rewrite in these cases just leads to a nicer and shorter IR and a shorter log file. |
|
It seems to be different on PPC. From our test suite, using clang 3.7 on Linux/PPC64:
With the obsolete integer rewrites in place I get for And without it: I prefer to match clang as close as possible here. |
|
As I said, as long as
Then we should do it consistently, either removing the obsoleteness check for all ABIs or doing it everywhere (as currently done for at least all 3 major ABIs I'm familiar with - x86 and x86_64). Needless to say, I prefer keeping it. |
Issue #1652 seems to be caused by ABI errors in the bootstrap compiler.
This PR updates the PPC/PPC64 ABI to conform to clang/gcc output.