From 8b58eb9dc49254926c91690380c065403b10fbb8 Mon Sep 17 00:00:00 2001 From: Jamie Cunliffe Date: Tue, 21 Jul 2020 13:46:22 +0100 Subject: [PATCH] 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. --- src/librustc_codegen_llvm/va_arg.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustc_codegen_llvm/va_arg.rs b/src/librustc_codegen_llvm/va_arg.rs index 8c0d256df23..54efa05aee8 100644 --- a/src/librustc_codegen_llvm/va_arg.rs +++ b/src/librustc_codegen_llvm/va_arg.rs @@ -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)); }