aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/CodeGen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-01 14:39:24 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-08 19:37:29 -0700
commit6986d2aca900bdda30f541baf9b06fb29688fe97 (patch)
treec5011736f5b9383478cabcbae8205c10258a6b77 /src/arch/x86_64/CodeGen.zig
parentbc69cb9b106cbb0748b960c10b7cf66d0c5fd28e (diff)
downloadzig-6986d2aca900bdda30f541baf9b06fb29688fe97.tar.gz
zig-6986d2aca900bdda30f541baf9b06fb29688fe97.zip
x86_64 sysv C ABI: fix f128 param and return types
Clang 17 passed struct{f128} parameters using rdi and rax, while Clang 18 matches GCC 13.2 behavior, passing them using xmm0. This commit makes Zig's LLVM backend match Clang 18 and GCC 13.2. The commit deletes a hack in x86_64/abi.zig which miscategorized f128 as "memory" which obviously disagreed with the spec.
Diffstat (limited to 'src/arch/x86_64/CodeGen.zig')
-rw-r--r--src/arch/x86_64/CodeGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index 7faf3d6d50..cc6e014080 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -14318,7 +14318,7 @@ fn moveStrategy(self: *Self, ty: Type, class: Register.Class, aligned: bool) !Mo
else => {
const classes = mem.sliceTo(&abi.classifySystemV(ty, mod, self.target.*, .other), .none);
assert(std.mem.indexOfNone(abi.Class, classes, &.{
- .integer, .sse, .memory, .float, .float_combine,
+ .integer, .sse, .sseup, .memory, .float, .float_combine,
}) == null);
const abi_size = ty.abiSize(mod);
if (abi_size < 4 or