From 0f61d1f0df887081d60558256e10944633eb868f Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Sat, 3 Sep 2022 01:05:46 +0300 Subject: stage2 llvm: improve handling of i128 on Windows C ABI --- src/codegen/llvm.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/codegen') 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, } } -- cgit v1.2.3