| ... | @@ -13507,24 +13507,27 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr | ... | @@ -13507,24 +13507,27 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr |
| 13507 | }, | 13507 | }, |
| 13508 | .lea_symbol => |sym_index| { | 13508 | .lea_symbol => |sym_index| { |
| 13509 | const atom_index = try self.owner.getSymbolIndex(self); | 13509 | const atom_index = try self.owner.getSymbolIndex(self); |
| 13510 | if (self.bin_file.cast(link.File.Elf)) |_| { | 13510 | switch (self.bin_file.tag) { |
| 13511 | try self.asmRegisterMemory( | 13511 | .elf, .macho => { |
| 13512 | .{ ._, .lea }, | 13512 | try self.asmRegisterMemory( |
| 13513 | dst_reg.to64(), | 13513 | .{ ._, .lea }, |
| 13514 | .{ | 13514 | dst_reg.to64(), |
| 13515 | .base = .{ .reloc = .{ | 13515 | .{ |
| 13516 | .atom_index = atom_index, | 13516 | .base = .{ .reloc = .{ |
| 13517 | .sym_index = sym_index.sym, | 13517 | .atom_index = atom_index, |
| 13518 | } }, | 13518 | .sym_index = sym_index.sym, |
| 13519 | .mod = .{ .rm = .{ | 13519 | } }, |
| 13520 | .size = .qword, | 13520 | .mod = .{ .rm = .{ |
| 13521 | .disp = sym_index.off, | 13521 | .size = .qword, |
| 13522 | } }, | 13522 | .disp = sym_index.off, |
| 13523 | }, | 13523 | } }, |
| 13524 | ); | 13524 | }, |
| 13525 | } else return self.fail("TODO emit symbol sequence on {s}", .{ | 13525 | ); |
| 13526 | @tagName(self.bin_file.tag), | 13526 | }, |
| 13527 | }); | 13527 | else => return self.fail("TODO emit symbol sequence on {s}", .{ |
| | 13528 | @tagName(self.bin_file.tag), |
| | 13529 | }), |
| | 13530 | } |
| 13528 | }, | 13531 | }, |
| 13529 | .lea_direct, .lea_got => |sym_index| { | 13532 | .lea_direct, .lea_got => |sym_index| { |
| 13530 | const atom_index = try self.owner.getSymbolIndex(self); | 13533 | const atom_index = try self.owner.getSymbolIndex(self); |
| ... | @@ -16066,7 +16069,7 @@ fn resolveInst(self: *Self, ref: Air.Inst.Ref) InnerError!MCValue { | ... | @@ -16066,7 +16069,7 @@ fn resolveInst(self: *Self, ref: Air.Inst.Ref) InnerError!MCValue { |
| 16066 | ); | 16069 | ); |
| 16067 | break :init .{ .load_frame = .{ .index = frame_index } }; | 16070 | break :init .{ .load_frame = .{ .index = frame_index } }; |
| 16068 | } else if (self.bin_file.cast(link.File.MachO)) |_| { | 16071 | } else if (self.bin_file.cast(link.File.MachO)) |_| { |
| 16069 | return self.fail("TODO implement lowering TLV variable to stack", .{}); | 16072 | return self.fail("TODO implement saving TLV variable to stack", .{}); |
| 16070 | } else break :init const_mcv, | 16073 | } else break :init const_mcv, |
| 16071 | else => break :init const_mcv, | 16074 | else => break :init const_mcv, |
| 16072 | } | 16075 | } |