byval parameter should have align 8 on aix
This commit is contained in:
parent
83ab648e00
commit
7bfcddf479
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue