Skip to content

Commit 9a4ce5e

Browse files
committed
implement va_arg for powerpc64 and powerpc64le
1 parent 68aa697 commit 9a4ce5e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

compiler/rustc_codegen_llvm/src/va_arg.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,18 @@ pub(super) fn emit_va_arg<'ll, 'tcx>(
475475
),
476476
"aarch64" => emit_aapcs_va_arg(bx, addr, target_ty),
477477
"s390x" => emit_s390x_va_arg(bx, addr, target_ty),
478+
"powerpc64" | "powerpc64le" => emit_ptr_va_arg(
479+
bx,
480+
addr,
481+
target_ty,
482+
PassMode::Direct,
483+
SlotSize::Bytes8,
484+
AllowHigherAlign::Yes,
485+
match &**arch {
486+
"powerpc64" => ForceRightAdjust::Yes,
487+
_ => ForceRightAdjust::No,
488+
},
489+
),
478490
// Windows x86_64
479491
"x86_64" if target.is_like_windows => {
480492
let target_ty_size = bx.cx.size_of(target_ty).bytes();

0 commit comments

Comments
 (0)