Skip to content

Commit 51dcfae

Browse files
committed
use natural align 4 for byval args
1 parent 83ab648 commit 51dcfae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_target/src/callconv/powerpc64.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ where
5858

5959
// The AIX ABI expect byval for aggregates
6060
// See https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/Targets/PPC.cpp.
61+
// natural alignment of byval pointer are align 4
6162
if !is_ret && abi == AIX {
62-
arg.pass_by_stack_offset(None);
63+
arg.pass_by_stack_offset(Some(Align::from_bytes(4).unwrap()));
6364
return;
6465
}
6566

0 commit comments

Comments
 (0)