Commit 8f4d9646 authored by Russ Cox's avatar Russ Cox

cmd/compile, cmd/internal: replace %P with %v in a few final prints

$ sizeof -p cmd/compile/internal/gc Node
Node 168
$

Change-Id: I1e2f17bfee0e6ca7213706c4cef8d990f4461915
Reviewed-on: https://go-review.googlesource.com/10533Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
parent fd2154f9
...@@ -194,7 +194,7 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -194,7 +194,7 @@ func cgen64(n *gc.Node, res *gc.Node) {
p1.To.Reg = ah.Reg p1.To.Reg = ah.Reg
p1.To.Offset = int64(al.Reg) p1.To.Offset = int64(al.Reg)
//print("%P\n", p1); //print("%v\n", p1);
// bl * ch + ah -> ah // bl * ch + ah -> ah
p1 = gins(arm.AMULA, nil, nil) p1 = gins(arm.AMULA, nil, nil)
...@@ -206,7 +206,7 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -206,7 +206,7 @@ func cgen64(n *gc.Node, res *gc.Node) {
p1.To.Reg = ah.Reg p1.To.Reg = ah.Reg
p1.To.Offset = int64(ah.Reg) p1.To.Offset = int64(ah.Reg)
//print("%P\n", p1); //print("%v\n", p1);
// bh * cl + ah -> ah // bh * cl + ah -> ah
p1 = gins(arm.AMULA, nil, nil) p1 = gins(arm.AMULA, nil, nil)
...@@ -218,7 +218,7 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -218,7 +218,7 @@ func cgen64(n *gc.Node, res *gc.Node) {
p1.To.Reg = ah.Reg p1.To.Reg = ah.Reg
p1.To.Offset = int64(ah.Reg) p1.To.Offset = int64(ah.Reg)
//print("%P\n", p1); //print("%v\n", p1);
gc.Regfree(&bh) gc.Regfree(&bh)
......
...@@ -395,7 +395,7 @@ func clearfat(nl *gc.Node) { ...@@ -395,7 +395,7 @@ func clearfat(nl *gc.Node) {
p.To.Offset = 4 p.To.Offset = 4
p.Scond |= arm.C_PBIT p.Scond |= arm.C_PBIT
//print("1. %P\n", p); //print("1. %v\n", p);
q-- q--
} }
} }
...@@ -407,7 +407,7 @@ func clearfat(nl *gc.Node) { ...@@ -407,7 +407,7 @@ func clearfat(nl *gc.Node) {
p.To.Offset = 1 p.To.Offset = 1
p.Scond |= arm.C_PBIT p.Scond |= arm.C_PBIT
//print("2. %P\n", p); //print("2. %v\n", p);
c-- c--
} }
......
...@@ -402,7 +402,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -402,7 +402,7 @@ func gmove(f *gc.Node, t *gc.Node) {
p1.From.Offset = 2<<5 | 31<<7 | int64(r1.Reg)&15 // r1->31 p1.From.Offset = 2<<5 | 31<<7 | int64(r1.Reg)&15 // r1->31
p1.From.Reg = 0 p1.From.Reg = 0
//print("gmove: %P\n", p1); //print("gmove: %v\n", p1);
gins(arm.AMOVW, &r1, &tlo) gins(arm.AMOVW, &r1, &tlo)
gins(arm.AMOVW, &r2, &thi) gins(arm.AMOVW, &r2, &thi)
......
...@@ -313,7 +313,7 @@ func Flowstart(firstp *obj.Prog, newData func() interface{}) *Graph { ...@@ -313,7 +313,7 @@ func Flowstart(firstp *obj.Prog, newData func() interface{}) *Graph {
Fatal("fnil %v / %v", p, p.To.Val.(*obj.Prog)) Fatal("fnil %v / %v", p, p.To.Val.(*obj.Prog))
} }
if f1 == f { if f1 == f {
//fatal("self loop %P", p); //fatal("self loop %v", p);
continue continue
} }
...@@ -1026,10 +1026,10 @@ for(f1 = f0; f1 != nil; f1 = f1->p1) { ...@@ -1026,10 +1026,10 @@ for(f1 = f0; f1 != nil; f1 = f1->p1) {
} }
if(f1->p1 == nil && f1->p2 == nil) { if(f1->p1 == nil && f1->p2 == nil) {
print("lost pred for %P\n", fcheck->prog); print("lost pred for %v\n", fcheck->prog);
for(f1=f0; f1!=nil; f1=f1->p1) { for(f1=f0; f1!=nil; f1=f1->p1) {
thearch.proginfo(&info, f1->prog); thearch.proginfo(&info, f1->prog);
print("\t%P %d %d %D %D\n", r1->prog, info.flags&RightWrite, thearch.sameaddr(&f1->prog->to, &fcheck->prog->from), &f1->prog->to, &fcheck->prog->from); print("\t%v %d %d %D %D\n", r1->prog, info.flags&RightWrite, thearch.sameaddr(&f1->prog->to, &fcheck->prog->from), &f1->prog->to, &fcheck->prog->from);
} }
fatal("lost pred trail"); fatal("lost pred trail");
} }
......
...@@ -720,7 +720,7 @@ func span5(ctxt *obj.Link, cursym *obj.LSym) { ...@@ -720,7 +720,7 @@ func span5(ctxt *obj.Link, cursym *obj.LSym) {
bflag = 1 bflag = 1
} }
//print("%P pc changed %d to %d in iter. %d\n", p, opc, (int32)p->pc, times); //print("%v pc changed %d to %d in iter. %d\n", p, opc, (int32)p->pc, times);
c = int32(p.Pc + int64(m)) c = int32(p.Pc + int64(m))
if m%4 != 0 || p.Pc%4 != 0 { if m%4 != 0 || p.Pc%4 != 0 {
......
...@@ -61,13 +61,13 @@ func savedata(ctxt *Link, s *LSym, p *Prog, pn string) { ...@@ -61,13 +61,13 @@ func savedata(ctxt *Link, s *LSym, p *Prog, pn string) {
mangle(pn) mangle(pn)
} }
if ctxt.Enforce_data_order != 0 && off < int32(len(s.P)) { if ctxt.Enforce_data_order != 0 && off < int32(len(s.P)) {
ctxt.Diag("data out of order (already have %d)\n%P", len(s.P), p) ctxt.Diag("data out of order (already have %d)\n%v", len(s.P), p)
} }
Symgrow(ctxt, s, int64(off+siz)) Symgrow(ctxt, s, int64(off+siz))
switch int(p.To.Type) { switch int(p.To.Type) {
default: default:
ctxt.Diag("bad data: %P", p) ctxt.Diag("bad data: %v", p)
case TYPE_FCONST: case TYPE_FCONST:
switch siz { switch siz {
......
...@@ -147,7 +147,7 @@ func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg ...@@ -147,7 +147,7 @@ func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg
var f *LSym var f *LSym
linkgetline(ctxt, p.Lineno, &f, &l) linkgetline(ctxt, p.Lineno, &f, &l)
if f == nil { if f == nil {
// print("getline failed for %s %P\n", ctxt->cursym->name, p); // print("getline failed for %s %v\n", ctxt->cursym->name, p);
return oldval return oldval
} }
......
...@@ -746,7 +746,7 @@ func oplook(ctxt *obj.Link, p *obj.Prog) *Optab { ...@@ -746,7 +746,7 @@ func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
a2 = C_REG a2 = C_REG
} }
//print("oplook %P %d %d %d %d\n", p, a1, a2, a3, a4); //print("oplook %v %d %d %d %d\n", p, a1, a2, a3, a4);
r0 := p.As & obj.AMask r0 := p.As & obj.AMask
o := oprange[r0].start o := oprange[r0].start
...@@ -1488,7 +1488,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) { ...@@ -1488,7 +1488,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
o4 := uint32(0) o4 := uint32(0)
o5 := uint32(0) o5 := uint32(0)
//print("%P => case %d\n", p, o->type); //print("%v => case %d\n", p, o->type);
switch o.type_ { switch o.type_ {
default: default:
ctxt.Diag("unknown type %d", o.type_) ctxt.Diag("unknown type %d", o.type_)
...@@ -2190,7 +2190,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) { ...@@ -2190,7 +2190,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
* qc has already complained. * qc has already complained.
* *
if(v < 0 || v > 31) if(v < 0 || v > 31)
ctxt->diag("illegal shift %ld\n%P", v, p); ctxt->diag("illegal shift %ld\n%v", v, p);
*/ */
if v < 0 { if v < 0 {
v = 0 v = 0
......
...@@ -3301,7 +3301,7 @@ func doasm(ctxt *obj.Link, p *obj.Prog) { ...@@ -3301,7 +3301,7 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
l = int(v >> 32) l = int(v >> 32)
if l == 0 && rel.Siz != 8 { if l == 0 && rel.Siz != 8 {
//p->mark |= 0100; //p->mark |= 0100;
//print("zero: %llux %P\n", v, p); //print("zero: %llux %v\n", v, p);
ctxt.Rexflag &^= (0x40 | Rxw) ctxt.Rexflag &^= (0x40 | Rxw)
ctxt.Rexflag |= regrex[p.To.Reg] & Rxb ctxt.Rexflag |= regrex[p.To.Reg] & Rxb
...@@ -3317,14 +3317,14 @@ func doasm(ctxt *obj.Link, p *obj.Prog) { ...@@ -3317,14 +3317,14 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
} else if l == -1 && uint64(v)&(uint64(1)<<31) != 0 { /* sign extend */ } else if l == -1 && uint64(v)&(uint64(1)<<31) != 0 { /* sign extend */
//p->mark |= 0100; //p->mark |= 0100;
//print("sign: %llux %P\n", v, p); //print("sign: %llux %v\n", v, p);
ctxt.Andptr[0] = 0xc7 ctxt.Andptr[0] = 0xc7
ctxt.Andptr = ctxt.Andptr[1:] ctxt.Andptr = ctxt.Andptr[1:]
asmando(ctxt, p, &p.To, 0) asmando(ctxt, p, &p.To, 0)
put4(ctxt, int32(v)) /* need all 8 */ put4(ctxt, int32(v)) /* need all 8 */
} else { } else {
//print("all: %llux %P\n", v, p); //print("all: %llux %v\n", v, p);
ctxt.Rexflag |= regrex[p.To.Reg] & Rxb ctxt.Rexflag |= regrex[p.To.Reg] & Rxb
ctxt.Andptr[0] = byte(op + reg[p.To.Reg]) ctxt.Andptr[0] = byte(op + reg[p.To.Reg])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment