aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-09-03 01:05:46 +0300
committerVeikka Tuominen <git@vexu.eu>2022-09-03 03:42:42 +0300
commit0f61d1f0df887081d60558256e10944633eb868f (patch)
tree2c850d79196b43f37ffeb90595607b63dda977f3 /src/codegen/llvm.zig
parentb83c037f9ffd7a4285de41c95827615fcbdbbf2f (diff)
downloadzig-0f61d1f0df887081d60558256e10944633eb868f.tar.gz
zig-0f61d1f0df887081d60558256e10944633eb868f.zip
stage2 llvm: improve handling of i128 on Windows C ABI
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index e7f4e123e3..004d152e1f 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -9687,6 +9687,7 @@ fn lowerFnRetTy(dg: *DeclGen, fn_info: Type.Payload.Function.Data) !*const llvm.
return dg.context.intType(@intCast(c_uint, abi_size * 8));
}
},
+ .win_i128 => return dg.context.intType(64).vectorType(2),
.memory => return dg.context.voidType(),
.sse => return dg.lowerType(fn_info.return_type),
else => unreachable,
@@ -9727,6 +9728,7 @@ fn lowerFnRetTy(dg: *DeclGen, fn_info: Type.Payload.Function.Data) !*const llvm.
@panic("TODO");
},
.memory => unreachable, // handled above
+ .win_i128 => unreachable, // windows only
.none => break,
}
}
@@ -9851,6 +9853,11 @@ const ParamTypeIterator = struct {
return .abi_sized_int;
}
},
+ .win_i128 => {
+ it.zig_index += 1;
+ it.llvm_index += 1;
+ return .byref;
+ },
.memory => {
it.zig_index += 1;
it.llvm_index += 1;
@@ -9905,6 +9912,7 @@ const ParamTypeIterator = struct {
@panic("TODO");
},
.memory => unreachable, // handled above
+ .win_i128 => unreachable, // windows only
.none => break,
}
}