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.
This commit is contained in:
Jamie Cunliffe 2020-07-21 13:46:22 +01:00
parent fc52b47e80
commit 8b58eb9dc4
1 changed files with 1 additions and 2 deletions

View File

@ -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));
}