summary refs log tree commit diff
path: root/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'amd64')
-rw-r--r--amd64/isel.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index 607c176..0f4c7a5 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -117,12 +117,9 @@ fixarg(Ref *r, int k, Ins *i, Fn *fn)
 		m = &fn->mem[r0.val];
 		if (req(m->base, R))
 		if (m->offset.type == CAddr) {
-			n = fn->ncon;
-			vgrow(&fn->con, ++fn->ncon);
-			fn->con[n] = m->offset;
-			m->offset.type = CUndef;
 			r0 = newtmp("isel", Kl, fn);
-			emit(Oaddr, Kl, r0, CON(n), R);
+			emit(Oaddr, Kl, r0, newcon(&m->offset, fn), R);
+			m->offset.type = CUndef;
 			m->base = r0;
 		}
 	}