]> git.lizzy.rs Git - rust.git/commitdiff
Remove the assert on alignment check.
authorJamie Cunliffe <Jamie.Cunliffe@arm.com>
Tue, 21 Jul 2020 12:46:22 +0000 (13:46 +0100)
committerJamie Cunliffe <Jamie.Cunliffe@arm.com>
Tue, 21 Jul 2020 14:24:26 +0000 (15:24 +0100)
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

index 8c0d256df2357cb26eb7e26fe92826c9f9956b29..54efa05aee81e315ea619eebb3b2bc827603f15d 100644 (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));
     }