| ... | @@ -10013,7 +10013,7 @@ fn genCall(self: *Self, info: union(enum) { | ... | @@ -10013,7 +10013,7 @@ fn genCall(self: *Self, info: union(enum) { |
| 10013 | const sym = elf_file.symbol(sym_index); | 10013 | const sym = elf_file.symbol(sym_index); |
| 10014 | _ = try sym.getOrCreateZigGotEntry(sym_index, elf_file); | 10014 | _ = try sym.getOrCreateZigGotEntry(sym_index, elf_file); |
| 10015 | if (self.bin_file.options.pic) { | 10015 | if (self.bin_file.options.pic) { |
| 10016 | try self.genSetReg(.rax, Type.usize, .{ .lea_symbol = sym.esym_index }); | 10016 | try self.genSetReg(.rax, Type.usize, .{ .load_symbol = sym.esym_index }); |
| 10017 | try self.asmRegister(.{ ._, .call }, .rax); | 10017 | try self.asmRegister(.{ ._, .call }, .rax); |
| 10018 | } else { | 10018 | } else { |
| 10019 | _ = try self.addInst(.{ | 10019 | _ = try self.addInst(.{ |
| ... | @@ -12766,7 +12766,7 @@ fn genLazySymbolRef( | ... | @@ -12766,7 +12766,7 @@ fn genLazySymbolRef( |
| 12766 | | 12766 | |
| 12767 | if (self.bin_file.options.pic) { | 12767 | if (self.bin_file.options.pic) { |
| 12768 | switch (tag) { | 12768 | switch (tag) { |
| 12769 | .lea, .call => try self.genSetReg(reg, Type.usize, .{ .lea_symbol = sym.esym_index }), | 12769 | .lea, .call => try self.genSetReg(reg, Type.usize, .{ .load_symbol = sym.esym_index }), |
| 12770 | .mov => try self.genSetReg(reg, Type.usize, .{ .load_symbol = sym.esym_index }), | 12770 | .mov => try self.genSetReg(reg, Type.usize, .{ .load_symbol = sym.esym_index }), |
| 12771 | else => unreachable, | 12771 | else => unreachable, |
| 12772 | } | 12772 | } |
| ... | @@ -12782,7 +12782,7 @@ fn genLazySymbolRef( | ... | @@ -12782,7 +12782,7 @@ fn genLazySymbolRef( |
| 12782 | }; | 12782 | }; |
| 12783 | switch (tag) { | 12783 | switch (tag) { |
| 12784 | .lea, .mov => _ = try self.addInst(.{ | 12784 | .lea, .mov => _ = try self.addInst(.{ |
| 12785 | .tag = tag, | 12785 | .tag = .mov, |
| 12786 | .ops = .linker_reloc, | 12786 | .ops = .linker_reloc, |
| 12787 | .data = .{ .rx = .{ | 12787 | .data = .{ .rx = .{ |
| 12788 | .r1 = reg.to64(), | 12788 | .r1 = reg.to64(), |
| ... | @@ -14686,7 +14686,6 @@ fn resolveInst(self: *Self, ref: Air.Inst.Ref) InnerError!MCValue { | ... | @@ -14686,7 +14686,6 @@ fn resolveInst(self: *Self, ref: Air.Inst.Ref) InnerError!MCValue { |
| 14686 | .ty = ty, | 14686 | .ty = ty, |
| 14687 | .val = ip_index.toValue(), | 14687 | .val = ip_index.toValue(), |
| 14688 | }); | 14688 | }); |
| 14689 | std.debug.print("genTypedValue: {any}\n", .{mcv}); | | |
| 14690 | if (!gop.found_existing) gop.value_ptr.* = InstTracking.init(mcv); | 14689 | if (!gop.found_existing) gop.value_ptr.* = InstTracking.init(mcv); |
| 14691 | break :mcv gop.value_ptr.short; | 14690 | break :mcv gop.value_ptr.short; |
| 14692 | }; | 14691 | }; |