ref: 0c7ce826f6c84a98865b26749cbce9cc304a6d18
parent: e96403b109bba4cf9581079a9bdf7dec22384075
author: Ori Bernstein <[email protected]>
date: Thu Jun 7 12:22:42 EDT 2012
Fix flipped order of blitting.
--- a/8/isel.c
+++ b/8/isel.c
@@ -696,8 +696,8 @@
loclbl(&r, args[0]);
break;
case Oblit:
- a = selexpr(s, args[0]);
- b = selexpr(s, args[1]);
+ b = selexpr(s, args[0]);
+ a = selexpr(s, args[1]);
blit(s, a, b, args[2]->expr.args[0]->lit.intval);
break;
--- a/8/reduce.c
+++ b/8/reduce.c
@@ -484,7 +484,7 @@
{
assert(n->type == Ndecl);
if (debug)
- printf("DECLARE %s(%ld) at %zd\n", declname(n), n->decl.sym->id, s->stksz + 4);
+ printf("DECLARE %s(%ld) at %zd\n", declname(n), n->decl.sym->id, s->stksz);
htput(s->locs, (void*)n->decl.sym->id, (void*)(s->stksz + 4));
s->stksz += size(n);
}
@@ -492,10 +492,10 @@
void declarearg(Simp *s, Node *n)
{
assert(n->type == Ndecl);
+ s->argsz += size(n);
if (debug)
printf("DECLARE %s(%ld) at %zd\n", declname(n), n->decl.sym->id, -(s->argsz + 8));
htput(s->locs, (void*)n->decl.sym->id, (void*)-(s->argsz + 8));
- s->argsz += size(n);
}
Node *simp(Simp *s, Node *n)