aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64/isel.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-25 13:28:56 +0100
committerlemon <lsof@mailbox.org>2025-12-25 13:28:56 +0100
commita6c2f8a9177eeae64b83e4aeafe46dbe310b3861 (patch)
treed7d4ad2a189170a5ca56a9b46f3571fb12d72bb4 /x86_64/isel.c
parent882ea80770120e4f94e98e46ef824cafc9ccfe1f (diff)
avoid GOT relocations in unnecessary instances
Also change xcon to have a flagset for symbols (whether it's a function, locally defined; later: thread local, etc).
Diffstat (limited to 'x86_64/isel.c')
-rw-r--r--x86_64/isel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86_64/isel.c b/x86_64/isel.c
index 9c99608..40d8db4 100644
--- a/x86_64/isel.c
+++ b/x86_64/isel.c
@@ -305,7 +305,7 @@ fuseaddr(union ref *r, struct block *blk, int *curi)
if (r->t != RSTACK && r->t != RTMP) return 0;
if (!aadd(&addr, blk, curi, *r)) return 0;
- if (isaddrcon(addr.base,0) && (ccopt.pic || (ccopt.pie && addr.index.bits) || conht[addr.base.i].isfunc)) {
+ if (isaddrcon(addr.base,0) && (ccopt.pic || (ccopt.pie && addr.index.bits) || (conht[addr.base.i].flag & SFUNC))) {
/* pic needs to load from GOT */
/* pie cannot encode RIP-relative address with index register */
/* first load symbol address into a temp register */