diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-09-03 01:05:46 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-09-03 03:42:42 +0300 |
| commit | 0f61d1f0df887081d60558256e10944633eb868f (patch) | |
| tree | 2c850d79196b43f37ffeb90595607b63dda977f3 /src/codegen/llvm.zig | |
| parent | b83c037f9ffd7a4285de41c95827615fcbdbbf2f (diff) | |
| download | zig-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.zig | 8 |
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, } } |
