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 {...@@ -1899,7 +1899,6 @@ pub fn maxIntAlignment(target: Target) u16 {
1899 // 2. The C ABI wants 16 for extern structs.1899 // 2. The C ABI wants 16 for extern structs.
1900 // 3. 16-byte cmpxchg needs 16-byte alignment.1900 // 3. 16-byte cmpxchg needs 16-byte alignment.
1901 // Same logic for powerpc64, mips64, sparc64.1901 // Same logic for powerpc64, mips64, sparc64.
1902 .x86_64,
1903 .powerpc64,1902 .powerpc64,
1904 .powerpc64le,1903 .powerpc64le,
1905 .mips64,1904 .mips64,
...@@ -1911,6 +1910,7 @@ pub fn maxIntAlignment(target: Target) u16 {...@@ -1911,6 +1910,7 @@ pub fn maxIntAlignment(target: Target) u16 {
1911 },1910 },
19121911
1913 // Even LLVMABIAlignmentOfType(i128) agrees on these targets.1912 // Even LLVMABIAlignmentOfType(i128) agrees on these targets.
1913 .x86_64,
1914 .aarch64,1914 .aarch64,
1915 .aarch64_be,1915 .aarch64_be,
1916 .aarch64_32,1916 .aarch64_32,
test/behavior/align.zig+1-1
...@@ -157,7 +157,6 @@ test "alignment and size of structs with 128-bit fields" {...@@ -157,7 +157,6 @@ test "alignment and size of structs with 128-bit fields" {
157 .powerpc64,157 .powerpc64,
158 .powerpc64le,158 .powerpc64le,
159 .sparc64,159 .sparc64,
160 .x86_64,
161 => switch (builtin.object_format) {160 => switch (builtin.object_format) {
162 .c => .{161 .c => .{
163 .a_align = 16,162 .a_align = 16,
...@@ -193,6 +192,7 @@ test "alignment and size of structs with 128-bit fields" {...@@ -193,6 +192,7 @@ test "alignment and size of structs with 128-bit fields" {
193 .bpfeb,192 .bpfeb,
194 .nvptx,193 .nvptx,
195 .nvptx64,194 .nvptx64,
195 .x86_64,
196 => .{196 => .{
197 .a_align = 16,197 .a_align = 16,
198 .a_size = 16,198 .a_size = 16,