aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-01 17:57:01 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-08 19:37:29 -0700
commit88ada2121ffd13a77ef8d38e7cf10509eb45853a (patch)
tree3a223929a6b5babfa67b10d1bf5251cbbea38742 /src/codegen
parent708894cf9903bab2e9b0dde0b609a6cc7cc55ffd (diff)
downloadzig-88ada2121ffd13a77ef8d38e7cf10509eb45853a.tar.gz
zig-88ada2121ffd13a77ef8d38e7cf10509eb45853a.zip
LLVM: fix x86 and x86_64 datalayout string calculation
now it matches clang again
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index bddfb2701e..c7b51ad507 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -671,6 +671,20 @@ const DataLayoutBuilder = struct {
abi = size;
force_abi = size == 64;
},
+ .x86 => switch (size) {
+ 128 => {
+ abi = size;
+ pref = size;
+ },
+ else => {},
+ },
+ .x86_64 => switch (size) {
+ 64, 128 => {
+ abi = size;
+ pref = size;
+ },
+ else => {},
+ },
else => {},
}
},