summary refs log tree commit diff
path: root/lisc/spill.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-11-13 15:28:40 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-11-13 15:28:40 -0500
commita670758b8735e3e857e013e05da23bf005f3bade (patch)
treeb81c856aeb938e7d4781d54928ebd906d54667af /lisc/spill.c
parent0aa9e83211e8568bc7d6e996da93184e9aff025d (diff)
downloadroux-a670758b8735e3e857e013e05da23bf005f3bade.tar.gz
this is a buggy shortcut!
Diffstat (limited to 'lisc/spill.c')
-rw-r--r--lisc/spill.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisc/spill.c b/lisc/spill.c
index 0b88574..431f509 100644
--- a/lisc/spill.c
+++ b/lisc/spill.c
@@ -386,9 +386,10 @@ spill(Fn *fn)
 			j = opdesc[i->op].nmem;
 			j -= rtype(i->arg[0]) == RAMem;
 			j -= rtype(i->arg[1]) == RAMem;
-			for (m=0; t=i->arg[m].val, m<2; m++)
+			for (m=0; m<2; m++)
 				switch (rtype(i->arg[m])) {
 				case RAMem:
+					t = i->arg[m].val;
 					ma = &fn->mem[t & AMask];
 					if (rtype(ma->base) == RTmp) {
 						BSET(v, ma->base.val);
@@ -400,6 +401,7 @@ spill(Fn *fn)
 					}
 					break;
 				case RTmp:
+					t = i->arg[m].val;
 					lvarg[m] = BGET(v, t);
 					BSET(v, t);
 					if (j-- <= 0)