diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-08 22:06:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-08 22:06:20 +0200 |
| commit | ecfc3384f129452674b2e919f226c72c55148a24 (patch) | |
| tree | b8b6961128026d437014d97226a3a80aa0c36a54 /tests/rustdoc-js-std/basic.js | |
| parent | 537aab7a2e7fe9cdf50b5ff18485e0793cd8db62 (diff) | |
| parent | 1b7342b4117e321012cbe49df5ae859d52031f2b (diff) | |
| download | rust-ecfc3384f129452674b2e919f226c72c55148a24.tar.gz rust-ecfc3384f129452674b2e919f226c72c55148a24.zip | |
Rollup merge of #122781 - nikic:ppc-abi-fix, r=cuviper
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 doubleword. 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. Though I didn't find any wording for Clang's behavior of clamping the alignment to 16. Fixes https://github.com/rust-lang/rust/issues/122767. r? `@cuviper`
Diffstat (limited to 'tests/rustdoc-js-std/basic.js')
0 files changed, 0 insertions, 0 deletions
