| ... | @@ -4091,11 +4091,11 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallModifier | ... | @@ -4091,11 +4091,11 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallModifier |
| 4091 | if (self.bin_file.cast(link.File.Elf)) |elf_file| { | 4091 | if (self.bin_file.cast(link.File.Elf)) |elf_file| { |
| 4092 | const atom_index = try elf_file.getOrCreateAtomForDecl(func.owner_decl); | 4092 | const atom_index = try elf_file.getOrCreateAtomForDecl(func.owner_decl); |
| 4093 | const atom = elf_file.getAtom(atom_index); | 4093 | const atom = elf_file.getAtom(atom_index); |
| 4094 | const got_addr = @intCast(u32, atom.getOffsetTableAddress(elf_file)); | 4094 | const got_addr = @intCast(i32, atom.getOffsetTableAddress(elf_file)); |
| 4095 | _ = try self.addInst(.{ | 4095 | _ = try self.addInst(.{ |
| 4096 | .tag = .call, | 4096 | .tag = .call, |
| 4097 | .ops = Mir.Inst.Ops.encode(.{ .flags = 0b01 }), | 4097 | .ops = Mir.Inst.Ops.encode(.{ .flags = 0b01 }), |
| 4098 | .data = .{ .imm = got_addr }, | 4098 | .data = .{ .disp = got_addr }, |
| 4099 | }); | 4099 | }); |
| 4100 | } else if (self.bin_file.cast(link.File.Coff)) |coff_file| { | 4100 | } else if (self.bin_file.cast(link.File.Coff)) |coff_file| { |
| 4101 | const atom_index = try coff_file.getOrCreateAtomForDecl(func.owner_decl); | 4101 | const atom_index = try coff_file.getOrCreateAtomForDecl(func.owner_decl); |
| ... | @@ -4142,7 +4142,7 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallModifier | ... | @@ -4142,7 +4142,7 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallModifier |
| 4142 | _ = try self.addInst(.{ | 4142 | _ = try self.addInst(.{ |
| 4143 | .tag = .call, | 4143 | .tag = .call, |
| 4144 | .ops = Mir.Inst.Ops.encode(.{ .flags = 0b01 }), | 4144 | .ops = Mir.Inst.Ops.encode(.{ .flags = 0b01 }), |
| 4145 | .data = .{ .imm = @intCast(u32, fn_got_addr) }, | 4145 | .data = .{ .disp = @intCast(i32, fn_got_addr) }, |
| 4146 | }); | 4146 | }); |
| 4147 | } else unreachable; | 4147 | } else unreachable; |
| 4148 | } else if (func_value.castTag(.extern_fn)) |func_payload| { | 4148 | } else if (func_value.castTag(.extern_fn)) |func_payload| { |