Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1692845

Browse files
committedDec 15, 2023
Auto merge of rust-lang#116672 - maurer:128-align, r=<try>
LLVM 18 x86 data layout update With https://reviews.llvm.org/D86310 LLVM now has i128 aligned to 16-bytes on x86 based platforms. This will be in LLVM-18. This patch updates all our spec targets to be 16-byte aligned, and removes the alignment when speaking to older LLVM. This results in Rust overaligning things relative to LLVM on older LLVMs. See rust-lang#54341
2 parents e6707df + 2f13a43 commit 1692845

File tree

66 files changed

+178
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+178
-151
lines changed
 

‎compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,9 +3238,13 @@ mod size_asserts {
32383238
static_assert_size!(Impl, 136);
32393239
static_assert_size!(Item, 136);
32403240
static_assert_size!(ItemKind, 64);
3241-
static_assert_size!(LitKind, 24);
3241+
// This can be removed after i128:128 is in the bootstrap compiler's target.
3242+
#[cfg(not(bootstrap))]
3243+
static_assert_size!(LitKind, 32);
32423244
static_assert_size!(Local, 72);
3243-
static_assert_size!(MetaItemLit, 40);
3245+
// This can be removed after i128:128 is in the bootstrap compiler's target.
3246+
#[cfg(not(bootstrap))]
3247+
static_assert_size!(MetaItemLit, 48);
32443248
static_assert_size!(Param, 40);
32453249
static_assert_size!(Pat, 72);
32463250
static_assert_size!(Path, 24);

‎compiler/rustc_codegen_llvm/src/abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::type_::Type;
66
use crate::type_of::LayoutLlvmExt;
77
use crate::value::Value;
88

9-
use rustc_codegen_ssa::mir::operand::OperandValue;
9+
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1010
use rustc_codegen_ssa::mir::place::PlaceRef;
1111
use rustc_codegen_ssa::traits::*;
1212
use rustc_codegen_ssa::MemFlags;
@@ -253,7 +253,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
253253
bx.lifetime_end(llscratch, scratch_size);
254254
}
255255
} else {
256-
OperandValue::Immediate(val).store(bx, dst);
256+
OperandRef::from_immediate_or_packed_pair(bx, val, self.layout).val.store(bx, dst);
257257
}
258258
}
259259

0 commit comments

Comments
 (0)
This repository has been archived.