aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'amd64')
-rw-r--r--amd64/isel.c7
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;
}