Skip to content

Commit

Permalink
use natural align 4 for byval args
Browse files Browse the repository at this point in the history
  • Loading branch information
mustartt committed Dec 16, 2024
1 parent 83ab648 commit 51dcfae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/callconv/powerpc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ where

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

Expand Down

0 comments on commit 51dcfae

Please sign in to comment.