about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2017-08-23 17:38:45 -0400
committerJosh Stone <jistone@redhat.com>2017-09-01 18:21:29 -0700
commita9bb599fb14fab9a9acee13c590b11a47c392cf6 (patch)
treeef67f8dcbfb516516472802cabc7d81aed5b0c28 /src/rustllvm/RustWrapper.cpp
parentf861b6ee46465097eec266c160ac53e230df7cf0 (diff)
downloadrust-a9bb599fb14fab9a9acee13c590b11a47c392cf6.tar.gz
rust-a9bb599fb14fab9a9acee13c590b11a47c392cf6.zip
powerpc64: improve extern struct ABI
These fixes all have to do with the 64-bit PowerPC ELF ABI for big-endian
targets.  The ELF v2 ABI for powerpc64le already worked well.

- Return after marking return aggregates indirect. Fixes #42757.
- Pass one-member float aggregates as direct argument values.
- Aggregate arguments less than 64-bit must be written in the least-
  significant bits of the parameter space.
- Larger aggregates are instead padded at the tail.
  (i.e. filling MSBs, padding the remaining LSBs.)

New tests were also added for the single-float aggregate, and a 3-byte
aggregate to check that it's filled into LSBs.  Overall, at least these
formerly-failing tests now pass on powerpc64:

- run-make/extern-fn-struct-passing-abi
- run-make/extern-fn-with-packed-struct
- run-pass/extern-pass-TwoU16s.rs
- run-pass/extern-pass-TwoU8s.rs
- run-pass/struct-return.rs
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions