aboutsummaryrefslogtreecommitdiff
path: root/amd64
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2024-04-22 13:58:29 +0200
committerQuentin Carbonneaux <[email protected]>2024-04-22 14:01:50 +0200
commitb24af7d3f79de32451c55bbdd7a27bf64598044f (patch)
tree4011370236788eec5d38875af796c2bf14f31e41 /amd64
parent99169df2ff4d92f67c7936ba6982d33670ea9a21 (diff)
revert 1b7770e271
Quotes are used on Apple target variants to flag that we must not add the _ symbol prefix.
Diffstat (limited to 'amd64')
-rw-r--r--amd64/isel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index ed0ba66..b94392e 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -88,7 +88,11 @@ fixarg(Ref *r, int k, Ins *i, Fn *fn)
memset(&a, 0, sizeof a);
a.offset.type = CAddr;
n = stashbits(&fn->con[r0.val].bits, KWIDE(k) ? 8 : 4);
- sprintf(buf, "%sfp%d", T.asloc, n);
+ /* quote the name so that we do not
+ * add symbol prefixes on the apple
+ * target variant
+ */
+ sprintf(buf, "\"%sfp%d\"", T.asloc, n);
a.offset.sym.id = intern(buf);
fn->mem[fn->nmem-1] = a;
}