diff options
| author | 2025-10-26 10:35:34 +0100 | |
|---|---|---|
| committer | 2025-10-26 10:35:34 +0100 | |
| commit | 021b254d914915907942b9066db7f7e1ae3a2dfe (patch) | |
| tree | 9f2176c2062adddb7d19609677555ec6015b7608 /amd64/isel.c | |
| parent | ded31fd62cfec6378808014b457c1fff55cfcfba (diff) | |
isel: fix address sel for absolute int addr
Diffstat (limited to 'amd64/isel.c')
| -rw-r--r-- | amd64/isel.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |