diff options
| author | Nikita Popov <npopov@redhat.com> | 2024-03-20 14:38:32 +0100 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2024-04-08 11:15:36 +0900 |
| commit | 009280c5e312bdf11cd0e0e1b336bf374eed7b00 (patch) | |
| tree | 9a54a0471723df2d5a799e83d3822aef0c5805b7 /tests/rustdoc-js-std/parser-errors.js | |
| parent | a2c72ce59414d689d3d9f7e6a6a97455d2ac6cad (diff) | |
| download | rust-009280c5e312bdf11cd0e0e1b336bf374eed7b00.tar.gz rust-009280c5e312bdf11cd0e0e1b336bf374eed7b00.zip | |
Fix argument ABI for overaligned structs on ppc64le
When passing a 16 (or higher) aligned struct by value on ppc64le, it needs to be passed as an array of `i128` rather than an array of `i64`. This will force the use of an even starting register. For the case of a 16 byte struct with alignment 16 it is important that `[1 x i128]` is used instead of `i128` -- apparently, the latter will get treated similarly to `[2 x i64]`, not exhibiting the correct ABI. Add a `force_array` flag to `Uniform` to support this. The relevant clang code can be found here: https://github.com/llvm/llvm-project/blob/fe2119a7b08b6e468b2a67768904ea85b1bf0a45/clang/lib/CodeGen/Targets/PPC.cpp#L878-L884 https://github.com/llvm/llvm-project/blob/fe2119a7b08b6e468b2a67768904ea85b1bf0a45/clang/lib/CodeGen/Targets/PPC.cpp#L780-L784 I think the corresponding psABI wording is this: > Fixed size aggregates and unions passed by value are mapped to as > many doublewords of the parameter save area as the value uses in > memory. Aggregrates and unions are aligned according to their > alignment requirements. This may result in doublewords being > skipped for alignment. In particular the last sentence. Fixes https://github.com/rust-lang/rust/issues/122767.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
