From 043e3b29cec156dd547d2cec15dec90271c2349b Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Thu, 6 Feb 2025 11:30:47 +0100 Subject: [PATCH] x86_64: fix calling convention typos --- src/arch/x86_64/CodeGen.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 956aa29c09..62783419df 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -43099,7 +43099,7 @@ fn genExternSymbolRef( ) InnerError!void { if (self.bin_file.cast(.coff)) |coff_file| { const global_index = try coff_file.getGlobalSymbol(callee, lib); - const scratch_reg = abi.getCAbiLinkerScratchReg(self.fn_type.fnCallingConvention(self.pt.zcu)); + const scratch_reg = abi.getCAbiLinkerScratchReg(self.target.cCallingConvention().?); _ = try self.addInst(.{ .tag = .mov, .ops = .import_reloc, @@ -44247,7 +44247,7 @@ fn airTagName(self: *CodeGen, inst: Air.Inst.Index) !void { try self.genSetReg(param_regs[1], enum_ty, operand, .{}); const enum_lazy_sym: link.File.LazySymbol = .{ .kind = .code, .ty = enum_ty.toIntern() }; - try self.genLazySymbolRef(.call, abi.getCAbiLinkerScratchReg(self.fn_type.fnCallingConvention(zcu)), enum_lazy_sym); + try self.genLazySymbolRef(.call, abi.getCAbiLinkerScratchReg(.auto), enum_lazy_sym); return self.finishAir(inst, dst_mcv, .{ un_op, .none, .none }); }