<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/codegen/powerpc64le-struct-align-128.rs, branch 1.82.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.82.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.82.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-05-31T05:56:43+00:00</updated>
<entry>
<title>Run rustfmt on `tests/codegen/`.</title>
<updated>2024-05-31T05:56:43+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-05-29T04:11:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=72800d3b896a5733d08213ec357f3a875f1f5b0e'/>
<id>urn:sha1:72800d3b896a5733d08213ec357f3a875f1f5b0e</id>
<content type='text'>
Except for `simd-intrinsic/`, which has a lot of files containing
multiple types like `u8x64` which really are better when hand-formatted.

There is a surprising amount of two-space indenting in this directory.

Non-trivial changes:
- `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the
  test.
- `rustfmt::skip` used in a few places where hand-formatting read more
  nicely: `enum/enum-match.rs`
- Line number adjustments needed for the expected output of
  `debug-column.rs` and `coroutine-debug.rs`.
</content>
</entry>
<entry>
<title>Fix argument ABI for overaligned structs on ppc64le</title>
<updated>2024-04-08T02:15:36+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-03-20T13:38:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=009280c5e312bdf11cd0e0e1b336bf374eed7b00'/>
<id>urn:sha1:009280c5e312bdf11cd0e0e1b336bf374eed7b00</id>
<content type='text'>
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:

&gt; Fixed size aggregates and unions passed by value are mapped to as
&gt; many doublewords of the parameter save area as the value uses in
&gt; memory. Aggregrates and unions are aligned according to their
&gt; alignment requirements. This may result in doublewords being
&gt; skipped for alignment.

In particular the last sentence.

Fixes https://github.com/rust-lang/rust/issues/122767.
</content>
</entry>
</feed>
