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