void
defframe(Prog *ptxt, Bvec *bv)
{
- int i, first;
+ int i, j, first;
uint32 frame;
Prog *p, *p1;
patch(p, p1);
} else {
first = 1;
- for(i=0; i<stkptrsize; i+=widthptr) {
- if(bvget(bv, i/widthptr)) {
+ for(i=0, j=0; i<stkptrsize; i+=widthptr, j+=2) {
+ if(bvget(bv, j) || bvget(bv, j+1)) {
if(first) {
p = appendp(p, AMOVW, D_CONST, NREG, 0, D_REG, 0, 0);
first = 0;
void
defframe(Prog *ptxt, Bvec *bv)
{
- int i;
+ int i, j;
uint32 frame;
Prog *p;
p = appendp(p, AREP, D_NONE, 0, D_NONE, 0);
appendp(p, ASTOSQ, D_NONE, 0, D_NONE, 0);
} else {
- for(i=0; i<stkptrsize; i+=widthptr)
- if(bvget(bv, i/widthptr))
+ for(i=0, j=0; i<stkptrsize; i+=widthptr, j+=2)
+ if(bvget(bv, j) || bvget(bv, j+1))
p = appendp(p, AMOVQ, D_CONST, 0, D_SP+D_INDIR, frame-stkptrsize+i);
}
}
{
uint32 frame;
Prog *p;
- int i;
+ int i, j;
// fill in argument size
ptxt->to.offset2 = rnd(curfn->type->argwid, widthptr);
p = appendp(p, AREP, D_NONE, 0, D_NONE, 0);
appendp(p, ASTOSL, D_NONE, 0, D_NONE, 0);
} else {
- for(i=0; i<stkptrsize; i+=widthptr)
- if(bvget(bv, i/widthptr))
+ for(i=0, j=0; i<stkptrsize; i+=widthptr, j+=2)
+ if(bvget(bv, j) || bvget(bv, j+1))
p = appendp(p, AMOVL, D_CONST, 0, D_SP+D_INDIR, frame-stkptrsize+i);
}
}