LLVM 18 uses 16 byte alignment for x86_64 i128

This commit is contained in:
Andrew Kelley 2024-04-26 14:07:31 -07:00
parent 65bea9ac07
commit a6856ef6d2
2 changed files with 2 additions and 2 deletions

View File

@ -1899,7 +1899,6 @@ pub fn maxIntAlignment(target: Target) u16 {
// 2. The C ABI wants 16 for extern structs.
// 3. 16-byte cmpxchg needs 16-byte alignment.
// Same logic for powerpc64, mips64, sparc64.
.x86_64,
.powerpc64,
.powerpc64le,
.mips64,
@ -1911,6 +1910,7 @@ pub fn maxIntAlignment(target: Target) u16 {
},
// Even LLVMABIAlignmentOfType(i128) agrees on these targets.
.x86_64,
.aarch64,
.aarch64_be,
.aarch64_32,

View File

@ -157,7 +157,6 @@ test "alignment and size of structs with 128-bit fields" {
.powerpc64,
.powerpc64le,
.sparc64,
.x86_64,
=> switch (builtin.object_format) {
.c => .{
.a_align = 16,
@ -193,6 +192,7 @@ test "alignment and size of structs with 128-bit fields" {
.bpfeb,
.nvptx,
.nvptx64,
.x86_64,
=> .{
.a_align = 16,
.a_size = 16,