authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-26 14:07:31-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-08 19:37:28-07:00
loga6856ef6d21635641320761a8f17205fd6e99fa9
treea4042f7f81f752c571cb99867ce091d054f4e01e
parent65bea9ac079e8d580f710b62f3c8cfcb3821d2cb

LLVM 18 uses 16 byte alignment for x86_64 i128


2 files changed, 2 insertions(+), 2 deletions(-)

lib/std/Target.zig+1-1
......@@ -1899,7 +1899,6 @@ pub fn maxIntAlignment(target: Target) u16 {
18991899 // 2. The C ABI wants 16 for extern structs.
19001900 // 3. 16-byte cmpxchg needs 16-byte alignment.
19011901 // Same logic for powerpc64, mips64, sparc64.
1902 .x86_64,
19031902 .powerpc64,
19041903 .powerpc64le,
19051904 .mips64,
......@@ -1911,6 +1910,7 @@ pub fn maxIntAlignment(target: Target) u16 {
19111910 },
19121911
19131912 // Even LLVMABIAlignmentOfType(i128) agrees on these targets.
1913 .x86_64,
19141914 .aarch64,
19151915 .aarch64_be,
19161916 .aarch64_32,
test/behavior/align.zig+1-1
......@@ -157,7 +157,6 @@ test "alignment and size of structs with 128-bit fields" {
157157 .powerpc64,
158158 .powerpc64le,
159159 .sparc64,
160 .x86_64,
161160 => switch (builtin.object_format) {
162161 .c => .{
163162 .a_align = 16,
......@@ -193,6 +192,7 @@ test "alignment and size of structs with 128-bit fields" {
193192 .bpfeb,
194193 .nvptx,
195194 .nvptx64,
195 .x86_64,
196196 => .{
197197 .a_align = 16,
198198 .a_size = 16,