| author | |
| committer | |
| log | 16abf51ceef2ba2ebb38f27270af676387435f05 |
| tree | 868f8623a5a8fb8f01b99f0bdc60044b4cf55704 |
| parent | f968dd0cb1fc9197fc6483ce235b037f6c86c8ce |
2 files changed, 6 insertions(+), 2 deletions(-)
src/arch/x86_64/CodeGen.zig+2-1| ... | ... | @@ -14104,7 +14104,7 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 14104 | 14104 | .{ .reg = try self.copyToTmpRegister(Type.usize, .{ .lea_got = sym_index }) } |
| 14105 | 14105 | else |
| 14106 | 14106 | return self.fail("invalid modifier: '{s}'", .{modifier}), |
| 14107 | .load_symbol => |sym_off| if (mem.eql(u8, modifier, "P")) | |
| 14107 | .lea_symbol => |sym_off| if (mem.eql(u8, modifier, "P")) | |
| 14108 | 14108 | .{ .reg = try self.copyToTmpRegister(Type.usize, .{ .lea_symbol = sym_off }) } |
| 14109 | 14109 | else |
| 14110 | 14110 | return self.fail("invalid modifier: '{s}'", .{modifier}), |
| ... | ... | @@ -18798,6 +18798,7 @@ fn genTypedValue(self: *Self, val: Value) InnerError!MCValue { |
| 18798 | 18798 | .immediate => |imm| .{ .immediate = imm }, |
| 18799 | 18799 | .memory => |addr| .{ .memory = addr }, |
| 18800 | 18800 | .load_symbol => |sym_index| .{ .load_symbol = .{ .sym = sym_index } }, |
| 18801 | .lea_symbol => |sym_index| .{ .lea_symbol = .{ .sym = sym_index } }, | |
| 18801 | 18802 | .load_direct => |sym_index| .{ .load_direct = sym_index }, |
| 18802 | 18803 | .load_got => |sym_index| .{ .lea_got = sym_index }, |
| 18803 | 18804 | .load_tlv => |sym_index| .{ .lea_tlv = sym_index }, |
src/codegen.zig+4-1| ... | ... | @@ -828,6 +828,9 @@ pub const GenResult = union(enum) { |
| 828 | 828 | /// Reference to memory location but deferred until linker allocated the Decl in memory. |
| 829 | 829 | /// Traditionally, this corresponds to emitting a relocation in a relocatable object file. |
| 830 | 830 | load_symbol: u32, |
| 831 | /// Reference to memory location but deferred until linker allocated the Decl in memory. | |
| 832 | /// Traditionally, this corresponds to emitting a relocation in a relocatable object file. | |
| 833 | lea_symbol: u32, | |
| 831 | 834 | }; |
| 832 | 835 | |
| 833 | 836 | fn mcv(val: MCValue) GenResult { |
| ... | ... | @@ -904,7 +907,7 @@ fn genNavRef( |
| 904 | 907 | if (!single_threaded and is_threadlocal) { |
| 905 | 908 | return GenResult.mcv(.{ .load_tlv = sym_index }); |
| 906 | 909 | } |
| 907 | return GenResult.mcv(.{ .load_symbol = sym_index }); | |
| 910 | return GenResult.mcv(.{ .lea_symbol = sym_index }); | |
| 908 | 911 | } else if (lf.cast(.macho)) |macho_file| { |
| 909 | 912 | const zo = macho_file.getZigObject().?; |
| 910 | 913 | if (is_extern) { |