Skip to content

Commit 8b58eb9

Browse files
committed
Remove the assert on alignment check.
Also the alignment should only be done on general register types as per the AAPCS so fixed that issue. Copyright (c) 2020, Arm Limited.
1 parent fc52b47 commit 8b58eb9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_codegen_llvm/va_arg.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ fn emit_aapcs_va_arg(
128128
// it could be on the stack so we have to update the offset and then check
129129
// the offset again.
130130

131-
if layout.align.abi.bytes() > 8 {
132-
assert!(layout.align.abi.bytes() <= 16);
131+
if gr_type && layout.align.abi.bytes() > 8 {
133132
reg_off_v = maybe_reg.add(reg_off_v, bx.const_i32(15));
134133
reg_off_v = maybe_reg.and(reg_off_v, bx.const_i32(-16));
135134
}

0 commit comments

Comments
 (0)