aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64/isel.c
diff options
context:
space:
mode:
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 5d373f3..67a4358 100644
--- a/x86_64/isel.c
+++ b/x86_64/isel.c
@@ -310,7 +310,7 @@ fuseaddr(union ref *r, struct block *blk, int *curi)
if (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))) {
+ if (isaddrcon(addr.base,0) && (ccopt.pic || (ccopt.pie && addr.index.bits) || conht[addr.base.i].isfunc)) {
/* pic needs to load from GOT */
/* pie cannot encode RIP-relative address with index register */
/* first load symbol address into a temp register */