aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2023-04-15 00:57:17 +0200
committerJakub Konka <kubkon@jakubkonka.com>2023-04-15 00:57:23 +0200
commit179117c114ca44d977f794961762e110c1955911 (patch)
tree61295bfab6c963c1d1935345896fb0a45351c41c /src/codegen.zig
parent0733c8c5ca03f55fe8f65f74cea89dfccf6079b4 (diff)
downloadzig-179117c114ca44d977f794961762e110c1955911.tar.gz
zig-179117c114ca44d977f794961762e110c1955911.zip
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
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig8
1 files changed, 4 insertions, 4 deletions
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,