aboutsummaryrefslogtreecommitdiff
path: root/rv64/isel.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2022-09-09 17:40:31 +0200
committerQuentin Carbonneaux <[email protected]>2022-10-08 21:48:42 +0200
commit00a30954aca97004cb6f586bdeeabb488f1e3c3f (patch)
tree951dc4c0a5be04fe7d5aed13f4201eb90c60f841 /rv64/isel.c
parent5cea0c20ee3573949a2c24e4b3dea65fcbf6e48b (diff)
add support for thread-local storage
The apple targets are not done yet.
Diffstat (limited to 'rv64/isel.c')
-rw-r--r--rv64/isel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rv64/isel.c b/rv64/isel.c
index 3d9884f..42c0097 100644
--- a/rv64/isel.c
+++ b/rv64/isel.c
@@ -44,8 +44,8 @@ fixarg(Ref *r, int k, Ins *i, Fn *fn)
n = stashbits(&c->bits, KWIDE(k) ? 8 : 4);
vgrow(&fn->con, ++fn->ncon);
c = &fn->con[fn->ncon-1];
- sprintf(buf, "fp%d", n);
- *c = (Con){.type = CAddr, .local = 1};
+ sprintf(buf, "\"%sfp%d\"", T.asloc, n);
+ *c = (Con){.type = CAddr};
c->label = intern(buf);
emit(Oload, k, r1, CON(c-fn->con), R);
break;