From 179117c114ca44d977f794961762e110c1955911 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sat, 15 Apr 2023 00:57:17 +0200 Subject: x86_64: split MCValue.tlv_reloc into .load_tlv and .lea_tlv `.load_tlv` signifies we want to load the value of a TLV `.lea_tlv` signifies we want to load effective address of a TLV --- src/codegen.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/codegen.zig') diff --git a/src/codegen.zig b/src/codegen.zig index 6939b750fd..15f4440788 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -932,10 +932,10 @@ pub const GenResult = union(enum) { /// such as ARM, the immediate will never exceed 32-bits. immediate: u64, linker_load: LinkerLoad, - /// Pointer to a threadlocal variable. - /// The address resolution will be deferred until the linker allocates everything in virtual memory. + /// Threadlocal variable with address deferred until the linker allocates + /// everything in virtual memory. /// Payload is a symbol index. - tlv_reloc: u32, + load_tlv: u32, /// Direct by-address reference to memory location. memory: u64, }; @@ -1005,7 +1005,7 @@ fn genDeclRef( const atom_index = try macho_file.getOrCreateAtomForDecl(decl_index); const sym_index = macho_file.getAtom(atom_index).getSymbolIndex().?; if (is_threadlocal) { - return GenResult.mcv(.{ .tlv_reloc = sym_index }); + return GenResult.mcv(.{ .load_tlv = sym_index }); } return GenResult.mcv(.{ .linker_load = .{ .type = .got, -- cgit v1.2.3