mirror of
https://github.com/golang/go
synced 2024-11-21 23:04:39 -07:00
cmd/5g, cmd/6g, cmd/8g: update frame zeroing for new bitmap format
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12740046
This commit is contained in:
parent
4c855f3830
commit
d3b04f46b5
@ -14,7 +14,7 @@ static Prog* appendp(Prog*, int, int, int, int32, int, int, int32);
|
||||
void
|
||||
defframe(Prog *ptxt, Bvec *bv)
|
||||
{
|
||||
int i, first;
|
||||
int i, j, first;
|
||||
uint32 frame;
|
||||
Prog *p, *p1;
|
||||
|
||||
@ -49,8 +49,8 @@ defframe(Prog *ptxt, Bvec *bv)
|
||||
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;
|
||||
|
@ -14,7 +14,7 @@ static Prog* appendp(Prog*, int, int, vlong, int, vlong);
|
||||
void
|
||||
defframe(Prog *ptxt, Bvec *bv)
|
||||
{
|
||||
int i;
|
||||
int i, j;
|
||||
uint32 frame;
|
||||
Prog *p;
|
||||
|
||||
@ -37,8 +37,8 @@ defframe(Prog *ptxt, Bvec *bv)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ defframe(Prog *ptxt, Bvec *bv)
|
||||
{
|
||||
uint32 frame;
|
||||
Prog *p;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
// fill in argument size
|
||||
ptxt->to.offset2 = rnd(curfn->type->argwid, widthptr);
|
||||
@ -39,8 +39,8 @@ defframe(Prog *ptxt, Bvec *bv)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user