aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/x86_64/CodeGen.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2025-10-08 16:08:05 -0400
committerAndrew Kelley <andrew@ziglang.org>2025-10-10 22:47:47 -0700
commit2e31077fe0e021858cf2f92f85e5fcfd12c41501 (patch)
tree5f1e04aebfe2e0f440cd3d8426c645d1a723b97b /src/codegen/x86_64/CodeGen.zig
parentb2bc6073c8ada065906da9e3b5a4a2e7db04c21d (diff)
downloadzig-2e31077fe0e021858cf2f92f85e5fcfd12c41501.tar.gz
zig-2e31077fe0e021858cf2f92f85e5fcfd12c41501.zip
Coff: implement threadlocal variables
Diffstat (limited to 'src/codegen/x86_64/CodeGen.zig')
-rw-r--r--src/codegen/x86_64/CodeGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/x86_64/CodeGen.zig b/src/codegen/x86_64/CodeGen.zig
index 2278a3df83..4fb935f01d 100644
--- a/src/codegen/x86_64/CodeGen.zig
+++ b/src/codegen/x86_64/CodeGen.zig
@@ -173685,7 +173685,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
const ty_nav = air_datas[@intFromEnum(inst)].ty_nav;
const nav = ip.getNav(ty_nav.nav);
const is_threadlocal = zcu.comp.config.any_non_single_threaded and nav.isThreadlocal(ip);
- if (is_threadlocal) if (cg.mod.pic) {
+ if (is_threadlocal) if (cg.target.ofmt == .coff or cg.mod.pic) {
try cg.spillRegisters(&.{ .rdi, .rax });
} else {
try cg.spillRegisters(&.{.rax});