From 021b254d914915907942b9066db7f7e1ae3a2dfe Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 26 Oct 2025 10:35:34 +0100 Subject: isel: fix address sel for absolute int addr --- amd64/isel.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'amd64/isel.c') diff --git a/amd64/isel.c b/amd64/isel.c index b1929be..1a0e688 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -244,6 +244,13 @@ fuseaddr(union ref *r, struct block *blk, int *curi) if (!ccopt.pic) addr.disp = 0; } + if (!addr.base.bits) { + /* absolute int address in disp */ + assert(!addr.index.bits); + addr.base = mkintcon(KPTR, addr.disp); + addr.disp = 0; + } + *r = mkaddr(addr); return 1; } -- cgit v1.2.3