commit a670758b8735e3e857e013e05da23bf005f3bade
parent 0aa9e83211e8568bc7d6e996da93184e9aff025d
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 13 Nov 2015 15:28:40 -0500
this is a buggy shortcut!
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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)