Skip to content

Commit 06ff181

Browse files
Update compiler/rustc_codegen_llvm/src/va_arg.rs
Co-authored-by: Jubilee <workingjubilee@gmail.com>
1 parent 0bcdc72 commit 06ff181

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

compiler/rustc_codegen_llvm/src/va_arg.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ fn x86_64_sysv64_va_arg_from_memory<'ll, 'tcx>(
810810
// byte boundary if alignment needed by type exceeds 8 byte boundary.
811811
// It isn't stated explicitly in the standard, but in practice we use
812812
// alignment greater than 16 where necessary.
813+
// The AMD64 psABI leaves unspecified what to do for alignments above 16, but
814+
// this behavior for 32+ alignment matches clang.
815+
// It currently (2026 July) can only occur for 16-byte-aligned types.
813816
let overflow_arg_area_v = if layout.layout.align.bytes() > 8 {
814817
round_pointer_up_to_alignment(bx, overflow_arg_area_v, layout.layout.align.abi)
815818
} else {

0 commit comments

Comments
 (0)