diff options
| author | Henry Jiang <henry.jiang1@ibm.com> | 2024-12-16 13:58:09 -0500 |
|---|---|---|
| committer | Henry Jiang <henry.jiang1@ibm.com> | 2024-12-17 18:36:44 -0500 |
| commit | 7bfcddf479d044b06fdb90855232e06d69d251bb (patch) | |
| tree | 3be099b7aa6b3db98bd06f9785c42c10d6c3ac76 | |
| parent | 83ab648e00ecbdef415baba3cfbac6f5df263b1c (diff) | |
| download | rust-7bfcddf479d044b06fdb90855232e06d69d251bb.tar.gz rust-7bfcddf479d044b06fdb90855232e06d69d251bb.zip | |
byval parameter should have align 8 on aix
| -rw-r--r-- | compiler/rustc_target/src/callconv/powerpc64.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/callconv/powerpc64.rs b/compiler/rustc_target/src/callconv/powerpc64.rs index 3a71592cbe0..92c1f6e7148 100644 --- a/compiler/rustc_target/src/callconv/powerpc64.rs +++ b/compiler/rustc_target/src/callconv/powerpc64.rs @@ -58,8 +58,10 @@ where // The AIX ABI expect byval for aggregates // See https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/Targets/PPC.cpp. + // The incoming parameter is represented as a pointer in the IR, + // the alignment is associated with the size of the register. (align 8 for 64bit) if !is_ret && abi == AIX { - arg.pass_by_stack_offset(None); + arg.pass_by_stack_offset(Some(Align::from_bytes(8).unwrap())); return; } |
