From cb199f47ca31b079212fe4fd3987e5ba39b12273 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 23 Oct 2025 10:25:06 +0200 Subject: isel: fix -fpic factoring out non-symbolic address operands --- amd64/isel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'amd64') diff --git a/amd64/isel.c b/amd64/isel.c index 6041faf..7ff84e4 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -235,7 +235,7 @@ fuseaddr(union ref *r, struct block *blk, int *curi) if (r->t != RTMP) return 0; if (!aadd(&addr, *r)) return 0; - if (ccopt.pic || (ccopt.pie && isaddrcon(addr.base) && addr.index.bits)) { + if (isaddrcon(addr.base) && (ccopt.pic || (ccopt.pie && addr.index.bits))) { /* pic needs to load from GOT */ /* pie cannot encode RIP-relative address with index register */ /* first load symbol address into a temp register */ -- cgit v1.2.3