1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:40:02 -07:00

cmd/6c, cmd/8c, cmd/8g: fix print of pc (which is vlong).

While we're at it, fix a wrong for statement in cmd/8g.

LGTM=rsc
R=rsc, golang-codereviews
CC=golang-codereviews
https://golang.org/cl/62700044
This commit is contained in:
Shenghou Ma 2014-02-13 03:09:03 -05:00
parent a3e3b8e9db
commit ca6186aa26
3 changed files with 10 additions and 10 deletions

View File

@ -1461,7 +1461,7 @@ fixjmp(Reg *firstr)
for(r=firstr; r; r=r->link) {
p = r->prog;
if(debug['R'] && debug['v'])
print("%04d %P\n", r->pc, p);
print("%04d %P\n", (int)r->pc, p);
if(p->as != ACALL && p->to.type == D_BRANCH && r->s2 && r->s2->prog->as == AJMP) {
r->s2 = chasejmp(r->s2, &jmploop);
p->to.offset = r->s2->pc;
@ -1486,7 +1486,7 @@ fixjmp(Reg *firstr)
// Let it stay.
} else {
if(debug['R'] && debug['v'])
print("del %04d %P\n", r->pc, p);
print("del %04d %P\n", (int)r->pc, p);
p->as = ANOP;
}
}
@ -1499,7 +1499,7 @@ fixjmp(Reg *firstr)
p = r->prog;
if(p->as == AJMP && p->to.type == D_BRANCH && r->s2 == r->link) {
if(debug['R'] && debug['v'])
print("del %04d %P\n", r->pc, p);
print("del %04d %P\n", (int)r->pc, p);
p->as = ANOP;
}
}
@ -1520,7 +1520,7 @@ fixjmp(Reg *firstr)
if(debug['R'] && debug['v']) {
print("\n");
for(r=firstr; r; r=r->link)
print("%04d %P\n", r->pc, r->prog);
print("%04d %P\n", (int)r->pc, r->prog);
print("\n");
}
}

View File

@ -558,7 +558,7 @@ brk:
if(debug['R'] && debug['v']) {
print("after pass 7 (peep)\n");
for(r=firstr; r; r=r->link)
print("%04d %P\n", r->pc, r->prog);
print("%04d %P\n", (int)r->pc, r->prog);
print("\n");
}
@ -1375,7 +1375,7 @@ fixjmp(Reg *firstr)
for(r=firstr; r; r=r->link) {
p = r->prog;
if(debug['R'] && debug['v'])
print("%04d %P\n", r->pc, p);
print("%04d %P\n", (int)r->pc, p);
if(p->as != ACALL && p->to.type == D_BRANCH && r->s2 && r->s2->prog->as == AJMP) {
r->s2 = chasejmp(r->s2, &jmploop);
p->to.offset = r->s2->pc;
@ -1400,7 +1400,7 @@ fixjmp(Reg *firstr)
// Let it stay.
} else {
if(debug['R'] && debug['v'])
print("del %04d %P\n", r->pc, p);
print("del %04d %P\n", (int)r->pc, p);
p->as = ANOP;
}
}
@ -1413,7 +1413,7 @@ fixjmp(Reg *firstr)
p = r->prog;
if(p->as == AJMP && p->to.type == D_BRANCH && r->s2 == r->link) {
if(debug['R'] && debug['v'])
print("del %04d %P\n", r->pc, p);
print("del %04d %P\n", (int)r->pc, p);
p->as = ANOP;
}
}
@ -1434,7 +1434,7 @@ fixjmp(Reg *firstr)
if(debug['R'] && debug['v']) {
print("\n");
for(r=firstr; r; r=r->link)
print("%04d %P\n", r->pc, r->prog);
print("%04d %P\n", (int)r->pc, r->prog);
print("\n");
}
}

View File

@ -1138,7 +1138,7 @@ dumpit(char *str, Flow *r0, int isreg)
r1 = r->p2;
if(r1 != nil) {
print(" pred:");
for(; r1 != nil; r1 = r->p2link)
for(; r1 != nil; r1 = r1->p2link)
print(" %.4ud", (int)r1->prog->pc);
print("\n");
}