Skip to content

Commit

Permalink
Remove the assert on alignment check.
Browse files Browse the repository at this point in the history
Also the alignment should only be done on general register types as
per the AAPCS so fixed that issue.

Copyright (c) 2020, Arm Limited.
  • Loading branch information
JamieCunliffe committed Jul 21, 2020
1 parent fc52b47 commit 8b58eb9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_codegen_llvm/va_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ fn emit_aapcs_va_arg(
// it could be on the stack so we have to update the offset and then check
// the offset again.

if layout.align.abi.bytes() > 8 {
assert!(layout.align.abi.bytes() <= 16);
if gr_type && layout.align.abi.bytes() > 8 {
reg_off_v = maybe_reg.add(reg_off_v, bx.const_i32(15));
reg_off_v = maybe_reg.and(reg_off_v, bx.const_i32(-16));
}
Expand Down

0 comments on commit 8b58eb9

Please sign in to comment.