@@ -12103,7 +12103,7 @@ fn firstParamSRet(fn_info: InternPool.Key.FuncType, zcu: *Zcu, target: *const st
12103
12103
return switch (fn_info.cc) {
12104
12104
.auto => returnTypeByRef(zcu, target, return_type),
12105
12105
.x86_64_sysv => firstParamSRetSystemV(return_type, zcu, target),
12106
- .x86_64_win => x86_64_abi.classifyWindows(return_type, zcu, target) == .memory,
12106
+ .x86_64_win => x86_64_abi.classifyWindows(return_type, zcu, target, .ret ) == .memory,
12107
12107
.x86_sysv, .x86_win => isByRef(return_type, zcu),
12108
12108
.x86_stdcall => !isScalar(zcu, return_type),
12109
12109
.wasm_mvp => wasm_c_abi.classifyType(return_type, zcu) == .indirect,
@@ -12205,7 +12205,7 @@ fn lowerFnRetTy(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType)
12205
12205
fn lowerWin64FnRetTy(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type {
12206
12206
const zcu = pt.zcu;
12207
12207
const return_type = Type.fromInterned(fn_info.return_type);
12208
- switch (x86_64_abi.classifyWindows(return_type, zcu, zcu.getTarget())) {
12208
+ switch (x86_64_abi.classifyWindows(return_type, zcu, zcu.getTarget(), .ret )) {
12209
12209
.integer => {
12210
12210
if (isScalar(zcu, return_type)) {
12211
12211
return o.lowerType(pt, return_type);
@@ -12476,7 +12476,7 @@ const ParamTypeIterator = struct {
12476
12476
12477
12477
fn nextWin64(it: *ParamTypeIterator, ty: Type) ?Lowering {
12478
12478
const zcu = it.pt.zcu;
12479
- switch (x86_64_abi.classifyWindows(ty, zcu, zcu.getTarget())) {
12479
+ switch (x86_64_abi.classifyWindows(ty, zcu, zcu.getTarget(), .arg )) {
12480
12480
.integer => {
12481
12481
if (isScalar(zcu, ty)) {
12482
12482
it.zig_index += 1;
0 commit comments