diff --git a/src/cmd/5c/list.c b/src/cmd/5c/list.c index c792c130da..ab0fae83c2 100644 --- a/src/cmd/5c/list.c +++ b/src/cmd/5c/list.c @@ -59,7 +59,7 @@ Bconv(Fmt *fp) if(str[0]) strcat(str, " "); if(var[i].sym == S) { - sprint(ss, "$%ld", var[i].offset); + sprint(ss, "$%d", var[i].offset); s = ss; } else s = var[i].sym->name; @@ -204,7 +204,7 @@ Dconv(Fmt *fp) break; case D_BRANCH: - sprint(str, "%ld(PC)", a->offset-pc); + sprint(str, "%d(PC)", a->offset-pc); break; case D_FCONST: @@ -307,7 +307,7 @@ Nconv(Fmt *fp) a = va_arg(fp->args, Adr*); s = a->sym; if(s == S) { - sprint(str, "%ld", a->offset); + sprint(str, "%d", a->offset); goto out; } switch(a->name) { @@ -316,23 +316,23 @@ Nconv(Fmt *fp) break; case D_NONE: - sprint(str, "%ld", a->offset); + sprint(str, "%d", a->offset); break; case D_EXTERN: - sprint(str, "%s+%ld(SB)", s->name, a->offset); + sprint(str, "%s+%d(SB)", s->name, a->offset); break; case D_STATIC: - sprint(str, "%s<>+%ld(SB)", s->name, a->offset); + sprint(str, "%s<>+%d(SB)", s->name, a->offset); break; case D_AUTO: - sprint(str, "%s-%ld(SP)", s->name, -a->offset); + sprint(str, "%s-%d(SP)", s->name, -a->offset); break; case D_PARAM: - sprint(str, "%s+%ld(FP)", s->name, a->offset); + sprint(str, "%s+%d(FP)", s->name, a->offset); break; } out: diff --git a/src/cmd/5c/mul.c b/src/cmd/5c/mul.c index 121f67d5b5..ff50c48456 100644 --- a/src/cmd/5c/mul.c +++ b/src/cmd/5c/mul.c @@ -115,7 +115,7 @@ mulcon0(int32 v) if(docode(hintab[g].hint, m->code, 1, 0)) return m; - print("multiply table failure %ld\n", v); + print("multiply table failure %d\n", v); m->code[0] = 0; return 0; @@ -132,7 +132,7 @@ no: if(gen1(g)) { if(docode(hint, m->code, 1, 0)) return m; - print("multiply table failure %ld\n", v); + print("multiply table failure %d\n", v); break; } } diff --git a/src/cmd/5c/reg.c b/src/cmd/5c/reg.c index f2d38d5196..8c97944184 100644 --- a/src/cmd/5c/reg.c +++ b/src/cmd/5c/reg.c @@ -309,7 +309,7 @@ loop2: if(debug['R'] && debug['v']) { print("\nprop structure:\n"); for(r = firstr; r != R; r = r->link) { - print("%ld:%P", r->loop, r->prog); + print("%d:%P", r->loop, r->prog); for(z=0; zset.b[z] | r->refahead.b[z] | r->calahead.b[z] | @@ -955,7 +955,7 @@ paint1(Reg *r, int bn) if(LOAD(r) & ~(r->set.b[z] & ~(r->use1.b[z]|r->use2.b[z])) & bb) { change -= CLOAD * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tld %B $%d\n", r->loop, + print("%d%P\td %B $%d\n", r->loop, r->prog, blsh(bn), change); } for(;;) { @@ -965,21 +965,21 @@ paint1(Reg *r, int bn) if(r->use1.b[z] & bb) { change += CREF * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tu1 %B $%d\n", r->loop, + print("%d%P\tu1 %B $%d\n", r->loop, p, blsh(bn), change); } if((r->use2.b[z]|r->set.b[z]) & bb) { change += CREF * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tu2 %B $%d\n", r->loop, + print("%d%P\tu2 %B $%d\n", r->loop, p, blsh(bn), change); } if(STORE(r) & r->regdiff.b[z] & bb) { change -= CLOAD * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tst %B $%d\n", r->loop, + print("%d%P\tst %B $%d\n", r->loop, p, blsh(bn), change); } diff --git a/src/cmd/5c/swt.c b/src/cmd/5c/swt.c index cefbf53d9c..7740ad2e5f 100644 --- a/src/cmd/5c/swt.c +++ b/src/cmd/5c/swt.c @@ -47,7 +47,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) if(nc < 5) { for(i=0; ival); + print("case = %.8ux\n", q->val); gopcode(OEQ, nodconst(q->val), n, Z); patch(p, q->label); q++; @@ -60,7 +60,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) i = nc / 2; r = q+i; if(debug['W']) - print("case > %.8lux\n", r->val); + print("case > %.8ux\n", r->val); gopcode(OGT, nodconst(r->val), n, Z); sp = p; gopcode(OEQ, nodconst(r->val), n, Z); /* just gen the B.EQ */ @@ -68,7 +68,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) swit1(q, i, def, n); if(debug['W']) - print("case < %.8lux\n", r->val); + print("case < %.8ux\n", r->val); patch(sp, pc); swit1(r+1, nc-i-1, def, n); return; @@ -81,7 +81,7 @@ direct: patch(p, def); for(i=0; ival); + print("case = %.8ux\n", q->val); while(q->val != v) { nextpc(); p->as = ABCASE; @@ -227,7 +227,7 @@ mulcon(Node *n, Node *nn) return 0; } if(debug['M'] && debug['v']) - print("%L multiply: %ld\n", n->lineno, v); + print("%L multiply: %d\n", n->lineno, v); memmove(code, m->code, sizeof(m->code)); code[sizeof(m->code)] = 0; @@ -668,7 +668,7 @@ align(int32 i, Type *t, int op) } o = xround(o, w); if(debug['A']) - print("align %s %ld %T = %ld\n", bnames[op], i, t, o); + print("align %s %d %T = %d\n", bnames[op], i, t, o); return o; } diff --git a/src/cmd/5g/list.c b/src/cmd/5g/list.c index 5add7e1154..6f0eeabfa8 100644 --- a/src/cmd/5g/list.c +++ b/src/cmd/5g/list.c @@ -57,18 +57,18 @@ Pconv(Fmt *fp) switch(p->as) { default: if(p->reg == NREG) - snprint(str, sizeof(str), "%.4ld (%L) %-7A%C %D,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A%C %D,%D", p->loc, p->lineno, p->as, p->scond, &p->from, &p->to); else if (p->from.type != D_FREG) - snprint(str, sizeof(str), "%.4ld (%L) %-7A%C %D,R%d,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A%C %D,R%d,%D", p->loc, p->lineno, p->as, p->scond, &p->from, p->reg, &p->to); else - snprint(str, sizeof(str), "%.4ld (%L) %-7A%C %D,F%d,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A%C %D,F%d,%D", p->loc, p->lineno, p->as, p->scond, &p->from, p->reg, &p->to); break; case ADATA: - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D/%d,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D/%d,%D", p->loc, p->lineno, p->as, &p->from, p->reg, &p->to); break; } diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c index ef7f6da297..8262d2c396 100644 --- a/src/cmd/5l/asm.c +++ b/src/cmd/5l/asm.c @@ -863,12 +863,12 @@ asmb(void) } cflush(); if(debug['c']){ - print("textsize=%ld\n", textsize); - print("datsize=%ld\n", datsize); - print("bsssize=%ld\n", bsssize); - print("symsize=%ld\n", symsize); - print("lcsize=%ld\n", lcsize); - print("total=%ld\n", textsize+datsize+bsssize+symsize+lcsize); + print("textsize=%d\n", textsize); + print("datsize=%d\n", datsize); + print("bsssize=%d\n", bsssize); + print("symsize=%d\n", symsize); + print("lcsize=%d\n", lcsize); + print("total=%d\n", textsize+datsize+bsssize+symsize+lcsize); } } @@ -980,7 +980,7 @@ void nopstat(char *f, Count *c) { if(c->outof) - Bprint(&bso, "%s delay %ld/%ld (%.2f)\n", f, + Bprint(&bso, "%s delay %d/%d (%.2f)\n", f, c->outof - c->count, c->outof, (double)(c->outof - c->count)/c->outof); } @@ -1186,7 +1186,7 @@ PP = p; o5 = 0; o6 = 0; armsize += o->size; -if(debug['P']) print("%ulx: %P type %d\n", (uint32)(p->pc), p, o->type); +if(debug['P']) print("%ux: %P type %d\n", (uint32)(p->pc), p, o->type); switch(o->type) { default: diag("unknown asm %d", o->type); @@ -1194,7 +1194,7 @@ if(debug['P']) print("%ulx: %P type %d\n", (uint32)(p->pc), p, o->type); break; case 0: /* pseudo ops */ -if(debug['G']) print("%ulx: %s: arm %d %d %d %d\n", (uint32)(p->pc), p->from.sym->name, p->from.sym->thumb, p->from.sym->foreign, p->from.sym->fnptr, p->from.sym->used); +if(debug['G']) print("%ux: %s: arm %d %d %d %d\n", (uint32)(p->pc), p->from.sym->name, p->from.sym->thumb, p->from.sym->foreign, p->from.sym->fnptr, p->from.sym->used); break; case 1: /* op R,[R],R */ diff --git a/src/cmd/5l/list.c b/src/cmd/5l/list.c index e75a1ecca5..666b03fde0 100644 --- a/src/cmd/5l/list.c +++ b/src/cmd/5l/list.c @@ -263,9 +263,9 @@ Dconv(Fmt *fp) if(curp->cond != P) { v = curp->cond->pc; if(a->sym != S) - snprint(str, sizeof str, "%s+%.5lux(BRANCH)", a->sym->name, v); + snprint(str, sizeof str, "%s+%.5ux(BRANCH)", a->sym->name, v); else - snprint(str, sizeof str, "%.5lux(BRANCH)", v); + snprint(str, sizeof str, "%.5ux(BRANCH)", v); } else if(a->sym != S) snprint(str, sizeof str, "%s+%d(APC)", a->sym->name, a->offset); diff --git a/src/cmd/5l/obj.c b/src/cmd/5l/obj.c index 3e1cf4d979..8232e29625 100644 --- a/src/cmd/5l/obj.c +++ b/src/cmd/5l/obj.c @@ -210,10 +210,10 @@ main(int argc, char *argv[]) break; } if(INITDAT != 0 && INITRND != 0) - print("warning: -D0x%lux is ignored because of -R0x%lux\n", + print("warning: -D0x%ux is ignored because of -R0x%ux\n", INITDAT, INITRND); if(debug['v']) - Bprint(&bso, "HEADER = -H0x%d -T0x%lux -D0x%lux -R0x%lux\n", + Bprint(&bso, "HEADER = -H0x%d -T0x%ux -D0x%ux -R0x%ux\n", HEADTYPE, INITTEXT, INITDAT, INITRND); Bflush(&bso); zprg.as = AGOK; @@ -454,7 +454,7 @@ loop: if(sig != 0){ if(s->sig != 0 && s->sig != sig) - diag("incompatible type signatures %lux(%s) and %lux(%s) for %s", s->sig, s->file, sig, pn, s->name); + diag("incompatible type signatures %ux(%s) and %ux(%s) for %s", s->sig, s->file, sig, pn, s->name); s->sig = sig; s->file = pn; } @@ -675,7 +675,7 @@ loop: if(p->from.type == D_FCONST && chipfloat(p->from.ieee) < 0) { /* size sb 9 max */ - sprint(literal, "$%lux", ieeedtof(p->from.ieee)); + sprint(literal, "$%ux", ieeedtof(p->from.ieee)); s = lookup(literal, 0); if(s->type == 0) { s->type = SBSS; @@ -710,7 +710,7 @@ loop: if(p->from.type == D_FCONST && chipfloat(p->from.ieee) < 0) { /* size sb 18 max */ - sprint(literal, "$%lux.%lux", + sprint(literal, "$%ux.%ux", p->from.ieee->l, p->from.ieee->h); s = lookup(literal, 0); if(s->type == 0) { diff --git a/src/cmd/5l/pass.c b/src/cmd/5l/pass.c index 0660dd2522..8225a43fc7 100644 --- a/src/cmd/5l/pass.c +++ b/src/cmd/5l/pass.c @@ -55,7 +55,7 @@ dodata(void) s->type, s->name, p); v = p->from.offset + p->reg; if(v > s->value) - diag("initialize bounds (%ld/%ld): %s\n%P", + diag("initialize bounds (%d/%d): %s\n%P", v, s->value, s->name, p); if((s->type == SBSS || s->type == SDATA) && (p->to.type == D_CONST || p->to.type == D_OCONST) && (p->to.name == D_EXTERN || p->to.name == D_STATIC)){ s = p->to.sym; @@ -394,7 +394,7 @@ patch(void) q = q->link; } if(q == P) { - diag("branch out of range %ld\n%P", c, p); + diag("branch out of range %d\n%P", c, p); p->to.type = D_NONE; } p->cond = q; diff --git a/src/cmd/5l/span.c b/src/cmd/5l/span.c index 264073f98a..4a168870b1 100644 --- a/src/cmd/5l/span.c +++ b/src/cmd/5l/span.c @@ -392,7 +392,7 @@ span(void) if(INITRND) INITDAT = rnd(c, INITRND); if(debug['v']) - Bprint(&bso, "tsize = %lux\n", textsize); + Bprint(&bso, "tsize = %ux\n", textsize); Bflush(&bso); } @@ -426,7 +426,7 @@ flushpool(Prog *p, int skip, int force) if(blitrl) { if(skip){ - if(0 && skip==1)print("note: flush literal pool at %lux: len=%lud ref=%lux\n", p->pc+4, pool.size, pool.start); + if(0 && skip==1)print("note: flush literal pool at %ux: len=%ud ref=%ux\n", p->pc+4, pool.size, pool.start); q = prg(); q->as = AB; q->to.type = D_BRANCH; diff --git a/src/cmd/5l/symtab.c b/src/cmd/5l/symtab.c index eacb2f398a..04e50fe1d4 100644 --- a/src/cmd/5l/symtab.c +++ b/src/cmd/5l/symtab.c @@ -105,7 +105,7 @@ asmsym(void) putsymb(a->asym->name, 'p', a->aoffset, 0); } if(debug['v'] || debug['n']) - Bprint(&bso, "symsize = %lud\n", symsize); + Bprint(&bso, "symsize = %ud\n", symsize); Bflush(&bso); } diff --git a/src/cmd/5l/thumb.c b/src/cmd/5l/thumb.c index 97292f640d..db7e01bdd5 100644 --- a/src/cmd/5l/thumb.c +++ b/src/cmd/5l/thumb.c @@ -683,7 +683,7 @@ thumbasmout(Prog *p, Optab *o) rt = p->to.reg; r = p->reg; o1 = o2 = o3 = o4 = o5 = o6 = o7 = 0; -if(debug['P']) print("%ulx: %P type %d %d\n", (uint32)(p->pc), p, o->type, p->align); +if(debug['P']) print("%ux: %P type %d %d\n", (uint32)(p->pc), p, o->type, p->align); opcount[o->type] += o->size; switch(o->type) { default: @@ -691,7 +691,7 @@ if(debug['P']) print("%ulx: %P type %d %d\n", (uint32)(p->pc), p, o->type, p->al prasm(p); break; case 0: /* pseudo ops */ -if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); +if(debug['G']) print("%ux: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); break; case 1: /* op R, -, R or op R, R, - */ o1 = thumboprr(p->as); @@ -1162,29 +1162,29 @@ if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); switch(o->size) { default: if(debug['a']) - Bprint(&bso, " %.8lux:\t\t%P\n", v, p); + Bprint(&bso, " %.8ux:\t\t%P\n", v, p); break; case 2: if(debug['a']) - Bprint(&bso, " %.8lux: %.8lux\t%P\n", v, o1, p); + Bprint(&bso, " %.8ux: %.8ux\t%P\n", v, o1, p); hputl(o1); break; case 4: if(debug['a']) - Bprint(&bso, " %.8lux: %.8lux %.8lux\t%P\n", v, o1, o2, p); + Bprint(&bso, " %.8ux: %.8ux %.8ux\t%P\n", v, o1, o2, p); hputl(o1); hputl(o2); break; case 6: if(debug['a']) - Bprint(&bso, "%.8lux: %.8lux %.8lux %.8lux\t%P\n", v, o1, o2, o3, p); + Bprint(&bso, "%.8ux: %.8ux %.8ux %.8ux\t%P\n", v, o1, o2, o3, p); hputl(o1); hputl(o2); hputl(o3); break; case 8: if(debug['a']) - Bprint(&bso, "%.8lux: %.8lux %.8lux %.8lux %.8lux\t%P\n", v, o1, o2, o3, o4, p); + Bprint(&bso, "%.8ux: %.8ux %.8ux %.8ux %.8ux\t%P\n", v, o1, o2, o3, o4, p); hputl(o1); hputl(o2); hputl(o3); @@ -1192,7 +1192,7 @@ if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); break; case 10: if(debug['a']) - Bprint(&bso, "%.8lux: %.8lux %.8lux %.8lux %.8lux %.8lux\t%P\n", v, o1, o2, o3, o4, o5, p); + Bprint(&bso, "%.8ux: %.8ux %.8ux %.8ux %.8ux %.8ux\t%P\n", v, o1, o2, o3, o4, o5, p); hputl(o1); hputl(o2); hputl(o3); @@ -1201,7 +1201,7 @@ if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); break; case 12: if(debug['a']) - Bprint(&bso, "%.8lux: %.8lux %.8lux %.8lux %.8lux %.8lux %.8lux\t%P\n", v, o1, o2, o3, o4, o5, o6, p); + Bprint(&bso, "%.8ux: %.8ux %.8ux %.8ux %.8ux %.8ux %.8ux\t%P\n", v, o1, o2, o3, o4, o5, o6, p); hputl(o1); hputl(o2); hputl(o3); @@ -1211,7 +1211,7 @@ if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); break; case 14: if(debug['a']) - Bprint(&bso, "%.8lux: %.8lux %.8lux %.8lux %.8lux %.8lux %.8lux %.8lux\t%P\n", v, o1, o2, o3, o4, o5, o6, o7, p); + Bprint(&bso, "%.8ux: %.8ux %.8ux %.8ux %.8ux %.8ux %.8ux %.8ux\t%P\n", v, o1, o2, o3, o4, o5, o6, o7, p); hputl(o1); hputl(o2); hputl(o3); @@ -1223,12 +1223,12 @@ if(debug['G']) print("%ulx: %s: thumb\n", (uint32)(p->pc), p->from.sym->name); } if(debug['G']){ if(o->type == 17){ - print("%lx: word %ld\n", p->pc, (o2<<16)+o1); + print("%x: word %d\n", p->pc, (o2<<16)+o1); return; } if(o->type == 50){ - print("%lx: word %ld\n", p->pc, (o2<<16)+o1); - print("%lx: word %ld\n", p->pc, (o4<<16)+o3); + print("%x: word %d\n", p->pc, (o2<<16)+o1); + print("%x: word %d\n", p->pc, (o4<<16)+o3); return; } if(o->size > 0) dis(o1, p->pc); diff --git a/src/cmd/6c/div.c b/src/cmd/6c/div.c index d67ef8df78..bad6c5e277 100644 --- a/src/cmd/6c/div.c +++ b/src/cmd/6c/div.c @@ -120,7 +120,7 @@ sdivgen(Node *l, Node *r, Node *ax, Node *dx) if(c < 0) c = -c; a = sdiv(c, &m, &s); -//print("a=%d i=%ld s=%d m=%lux\n", a, (long)r->vconst, s, m); +//print("a=%d i=%d s=%d m=%ux\n", a, (long)r->vconst, s, m); gins(AMOVL, nodconst(m), ax); gins(AIMULL, l, Z); gins(AMOVL, l, ax); @@ -141,7 +141,7 @@ udivgen(Node *l, Node *r, Node *ax, Node *dx) Node nod; a = udiv(r->vconst, &m, &s, &t); -//print("a=%ud i=%ld p=%d s=%d m=%lux\n", a, (long)r->vconst, t, s, m); +//print("a=%ud i=%d p=%d s=%d m=%ux\n", a, (long)r->vconst, t, s, m); if(t != 0) { gins(AMOVL, l, ax); gins(ASHRL, nodconst(t), ax); diff --git a/src/cmd/6c/mul.c b/src/cmd/6c/mul.c index eefeacaeda..ab6883e7aa 100644 --- a/src/cmd/6c/mul.c +++ b/src/cmd/6c/mul.c @@ -355,7 +355,7 @@ mulgen1(uint32 v, Node *n) mulparam(v, p); found: -// print("v=%.lx a=%d n=%d s=%d g=%d o=%d \n", p->value, p->alg, p->neg, p->shift, p->arg, p->off); +// print("v=%.x a=%d n=%d s=%d g=%d o=%d \n", p->value, p->alg, p->neg, p->shift, p->arg, p->off); if(p->alg < 0) return 0; diff --git a/src/cmd/6c/reg.c b/src/cmd/6c/reg.c index 431501202e..996128f75f 100644 --- a/src/cmd/6c/reg.c +++ b/src/cmd/6c/reg.c @@ -448,7 +448,7 @@ regopt(Prog *p) if(debug['R'] && debug['v']) { print("\nlooping structure:\n"); for(r = firstr; r != R; r = r->link) { - print("%ld:%P", r->loop, r->prog); + print("%d:%P", r->loop, r->prog); for(z=0; zuse1.b[z] | r->use2.b[z] | @@ -1113,7 +1113,7 @@ paint1(Reg *r, int bn) if(LOAD(r) & ~(r->set.b[z]&~(r->use1.b[z]|r->use2.b[z])) & bb) { change -= CLOAD * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tld %B $%d\n", r->loop, + print("%d%P\td %B $%d\n", r->loop, r->prog, blsh(bn), change); } for(;;) { @@ -1123,21 +1123,21 @@ paint1(Reg *r, int bn) if(r->use1.b[z] & bb) { change += CREF * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tu1 %B $%d\n", r->loop, + print("%d%P\tu1 %B $%d\n", r->loop, p, blsh(bn), change); } if((r->use2.b[z]|r->set.b[z]) & bb) { change += CREF * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tu2 %B $%d\n", r->loop, + print("%d%P\tu2 %B $%d\n", r->loop, p, blsh(bn), change); } if(STORE(r) & r->regdiff.b[z] & bb) { change -= CLOAD * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tst %B $%d\n", r->loop, + print("%d%P\tst %B $%d\n", r->loop, p, blsh(bn), change); } @@ -1174,7 +1174,7 @@ regset(Reg *r, uint32 bb) while(b = bb & ~(bb-1)) { v.type = b & 0xFFFF? BtoR(b): BtoF(b); if(v.type == 0) - diag(Z, "zero v.type for %#lux", b); + diag(Z, "zero v.type for %#ux", b); c = copyu(r->prog, &v, A); if(c == 3) set |= b; diff --git a/src/cmd/6c/swt.c b/src/cmd/6c/swt.c index 668a1fdbcb..1597fdf34e 100644 --- a/src/cmd/6c/swt.c +++ b/src/cmd/6c/swt.c @@ -566,7 +566,7 @@ align(int32 i, Type *t, int op) } o = xround(o, w); if(debug['A']) - print("align %s %ld %T = %ld\n", bnames[op], i, t, o); + print("align %s %d %T = %d\n", bnames[op], i, t, o); return o; } diff --git a/src/cmd/6g/list.c b/src/cmd/6g/list.c index 24e8bc70b9..c8077c97a1 100644 --- a/src/cmd/6g/list.c +++ b/src/cmd/6g/list.c @@ -56,18 +56,18 @@ Pconv(Fmt *fp) snprint(scale, sizeof scale, "%d,", p->from.scale); switch(p->as) { default: - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%s%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%D", p->loc, p->lineno, p->as, &p->from, scale, &p->to); break; case ADATA: sconsize = p->from.scale; - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D/%d,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D/%d,%D", p->loc, p->lineno, p->as, &p->from, sconsize, &p->to); break; case ATEXT: - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%s%lD", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%lD", p->loc, p->lineno, p->as, &p->from, scale, &p->to); break; } @@ -108,7 +108,7 @@ Dconv(Fmt *fp) if(a->branch == nil) snprint(str, sizeof(str), ""); else - snprint(str, sizeof(str), "%ld", a->branch->loc); + snprint(str, sizeof(str), "%d", a->branch->loc); break; case D_EXTERN: @@ -131,7 +131,7 @@ Dconv(Fmt *fp) if(fp->flags & FmtLong) { d1 = a->offset & 0xffffffffLL; d2 = (a->offset>>32) & 0xffffffffLL; - snprint(str, sizeof(str), "$%lud-%lud", (ulong)d1, (ulong)d2); + snprint(str, sizeof(str), "$%ud-%ud", (ulong)d1, (ulong)d2); break; } snprint(str, sizeof(str), "$%lld", a->offset); diff --git a/src/cmd/6g/reg.c b/src/cmd/6g/reg.c index e92740e04b..4646270663 100644 --- a/src/cmd/6g/reg.c +++ b/src/cmd/6g/reg.c @@ -682,17 +682,17 @@ brk: print("\nstats\n"); if(ostats.ncvtreg) - print(" %4ld cvtreg\n", ostats.ncvtreg); + print(" %4d cvtreg\n", ostats.ncvtreg); if(ostats.nspill) - print(" %4ld spill\n", ostats.nspill); + print(" %4d spill\n", ostats.nspill); if(ostats.nreload) - print(" %4ld reload\n", ostats.nreload); + print(" %4d reload\n", ostats.nreload); if(ostats.ndelmov) - print(" %4ld delmov\n", ostats.ndelmov); + print(" %4d delmov\n", ostats.ndelmov); if(ostats.nvar) - print(" %4ld delmov\n", ostats.nvar); + print(" %4d delmov\n", ostats.nvar); if(ostats.naddr) - print(" %4ld delmov\n", ostats.naddr); + print(" %4d delmov\n", ostats.naddr); memset(&ostats, 0, sizeof(ostats)); } @@ -1268,7 +1268,7 @@ regset(Reg *r, uint32 bb) while(b = bb & ~(bb-1)) { v.type = b & 0xFFFF? BtoR(b): BtoF(b); if(v.type == 0) - fatal("zero v.type for %#lux", b); + fatal("zero v.type for %#ux", b); c = copyu(r->prog, &v, A); if(c == 3) set |= b; @@ -1486,7 +1486,7 @@ dumpone(Reg *r) int z; Bits bit; - print("%ld:%P", r->loop, r->prog); + print("%d:%P", r->loop, r->prog); for(z=0; zset.b[z] | @@ -1535,14 +1535,14 @@ dumpit(char *str, Reg *r0) if(r1 != R) { print(" pred:"); for(; r1 != R; r1 = r1->p2link) - print(" %.4lud", r1->prog->loc); + print(" %.4ud", r1->prog->loc); print("\n"); } // r1 = r->s1; // if(r1 != R) { // print(" succ:"); // for(; r1 != R; r1 = r1->s1) -// print(" %.4lud", r1->prog->loc); +// print(" %.4ud", r1->prog->loc); // print("\n"); // } } diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c index 1c3cade7f8..fcca32748d 100644 --- a/src/cmd/6l/asm.c +++ b/src/cmd/6l/asm.c @@ -532,7 +532,7 @@ asmb(void) switch(HEADTYPE) { default: - diag("unknown header type %ld", HEADTYPE); + diag("unknown header type %d", HEADTYPE); case 2: case 5: seek(cout, HEADR+textsize, 0); diff --git a/src/cmd/6l/list.c b/src/cmd/6l/list.c index 770a2e99d4..63b0d43bda 100644 --- a/src/cmd/6l/list.c +++ b/src/cmd/6l/list.c @@ -178,7 +178,7 @@ Dconv(Fmt *fp) break; case D_FCONST: - snprint(str, sizeof(str), "$(%.8lux,%.8lux)", a->ieee.h, a->ieee.l); + snprint(str, sizeof(str), "$(%.8ux,%.8ux)", a->ieee.h, a->ieee.l); break; case D_SCONST: diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c index 338f086749..112199b61c 100644 --- a/src/cmd/6l/obj.c +++ b/src/cmd/6l/obj.c @@ -202,10 +202,10 @@ main(int argc, char *argv[]) break; } if(INITDAT != 0 && INITRND != 0) - print("warning: -D0x%llux is ignored because of -R0x%lux\n", + print("warning: -D0x%llux is ignored because of -R0x%ux\n", INITDAT, INITRND); if(debug['v']) - Bprint(&bso, "HEADER = -H%ld -T0x%llux -D0x%llux -R0x%lux\n", + Bprint(&bso, "HEADER = -H%d -T0x%llux -D0x%llux -R0x%ux\n", HEADTYPE, INITTEXT, INITDAT, INITRND); Bflush(&bso); instinit(); @@ -257,7 +257,7 @@ main(int argc, char *argv[]) undef(); if(debug['v']) { Bprint(&bso, "%5.2f cpu time\n", cputime()); - Bprint(&bso, "%ld symbols\n", nsymbol); + Bprint(&bso, "%d symbols\n", nsymbol); Bprint(&bso, "%d sizeof adr\n", sizeof(Adr)); Bprint(&bso, "%d sizeof prog\n", sizeof(Prog)); } @@ -429,7 +429,7 @@ loop: if(sig != 0){ if(s->sig != 0 && s->sig != sig) diag("incompatible type signatures" - "%lux(%s) and %lux(%s) for %s", + "%ux(%s) and %ux(%s) for %s", s->sig, s->file, sig, pn, s->name); s->sig = sig; s->file = pn; @@ -633,7 +633,7 @@ loop: goto casdef; if(p->from.type == D_FCONST) { /* size sb 9 max */ - sprint(literal, "$%lux", ieeedtof(&p->from.ieee)); + sprint(literal, "$%ux", ieeedtof(&p->from.ieee)); s = lookup(literal, 0); if(s->type == 0) { s->type = SBSS; @@ -678,7 +678,7 @@ loop: goto casdef; if(p->from.type == D_FCONST) { /* size sb 18 max */ - sprint(literal, "$%lux.%lux", + sprint(literal, "$%ux.%ux", p->from.ieee.l, p->from.ieee.h); s = lookup(literal, 0); if(s->type == 0) { diff --git a/src/cmd/6l/symtab.c b/src/cmd/6l/symtab.c index 61451882d4..ef3e707e06 100644 --- a/src/cmd/6l/symtab.c +++ b/src/cmd/6l/symtab.c @@ -234,7 +234,7 @@ genasmsym(void (*put)(char*, int, vlong, vlong, int, Sym*)) put(a->asym->name, 'p', a->aoffset, 0, 0, a->gotype); } if(debug['v'] || debug['n']) - Bprint(&bso, "symsize = %lud\n", symsize); + Bprint(&bso, "symsize = %ud\n", symsize); Bflush(&bso); } diff --git a/src/cmd/8c/div.c b/src/cmd/8c/div.c index 538e3522c0..14945052ea 100644 --- a/src/cmd/8c/div.c +++ b/src/cmd/8c/div.c @@ -120,7 +120,7 @@ sdivgen(Node *l, Node *r, Node *ax, Node *dx) if(c < 0) c = -c; a = sdiv(c, &m, &s); -//print("a=%d i=%ld s=%d m=%lux\n", a, (int32)r->vconst, s, m); +//print("a=%d i=%d s=%d m=%ux\n", a, (int32)r->vconst, s, m); gins(AMOVL, nodconst(m), ax); gins(AIMULL, l, Z); gins(AMOVL, l, ax); @@ -141,7 +141,7 @@ udivgen(Node *l, Node *r, Node *ax, Node *dx) Node nod; a = udiv(r->vconst, &m, &s, &t); -//print("a=%ud i=%ld p=%d s=%d m=%lux\n", a, (int32)r->vconst, t, s, m); +//print("a=%ud i=%d p=%d s=%d m=%ux\n", a, (int32)r->vconst, t, s, m); if(t != 0) { gins(AMOVL, l, ax); gins(ASHRL, nodconst(t), ax); diff --git a/src/cmd/8c/mul.c b/src/cmd/8c/mul.c index 2b7332d541..a0742807ea 100644 --- a/src/cmd/8c/mul.c +++ b/src/cmd/8c/mul.c @@ -355,7 +355,7 @@ mulgen1(uint32 v, Node *n) mulparam(v, p); found: -// print("v=%.lx a=%d n=%d s=%d g=%d o=%d \n", p->value, p->alg, p->neg, p->shift, p->arg, p->off); +// print("v=%.x a=%d n=%d s=%d g=%d o=%d \n", p->value, p->alg, p->neg, p->shift, p->arg, p->off); if(p->alg < 0) return 0; diff --git a/src/cmd/8c/reg.c b/src/cmd/8c/reg.c index 837da2d04c..6ba07bed28 100644 --- a/src/cmd/8c/reg.c +++ b/src/cmd/8c/reg.c @@ -382,7 +382,7 @@ regopt(Prog *p) if(debug['R'] && debug['v']) { print("\nlooping structure:\n"); for(r = firstr; r != R; r = r->link) { - print("%ld:%P", r->loop, r->prog); + print("%d:%P", r->loop, r->prog); for(z=0; zuse1.b[z] | r->use2.b[z] | @@ -1031,7 +1031,7 @@ paint1(Reg *r, int bn) if(LOAD(r) & ~(r->set.b[z]&~(r->use1.b[z]|r->use2.b[z])) & bb) { change -= CLOAD * r->loop; if(debug['R'] && debug['v']) - print("%ld%P\tld %B $%d\n", r->loop, + print("%d%P\td %B $%d\n", r->loop, r->prog, blsh(bn), change); } for(;;) { @@ -1044,7 +1044,7 @@ paint1(Reg *r, int bn) if(BtoR(bb) != D_F0) change = -CINF; if(debug['R'] && debug['v']) - print("%ld%P\tu1 %B $%d\n", r->loop, + print("%d%P\tu1 %B $%d\n", r->loop, p, blsh(bn), change); } @@ -1054,7 +1054,7 @@ paint1(Reg *r, int bn) if(BtoR(bb) != D_F0) change = -CINF; if(debug['R'] && debug['v']) - print("%ld%P\tu2 %B $%d\n", r->loop, + print("%d%P\tu2 %B $%d\n", r->loop, p, blsh(bn), change); } @@ -1064,7 +1064,7 @@ paint1(Reg *r, int bn) if(BtoR(bb) != D_F0) change = -CINF; if(debug['R'] && debug['v']) - print("%ld%P\tst %B $%d\n", r->loop, + print("%d%P\tst %B $%d\n", r->loop, p, blsh(bn), change); } diff --git a/src/cmd/8c/swt.c b/src/cmd/8c/swt.c index 1c502f5ff3..46a0290d9d 100644 --- a/src/cmd/8c/swt.c +++ b/src/cmd/8c/swt.c @@ -40,7 +40,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) if(nc < 5) { for(i=0; ival); + print("case = %.8ux\n", q->val); gopcode(OEQ, n->type, n, nodconst(q->val)); patch(p, q->label); q++; @@ -52,7 +52,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) i = nc / 2; r = q+i; if(debug['W']) - print("case > %.8lux\n", r->val); + print("case > %.8ux\n", r->val); gopcode(OGT, n->type, n, nodconst(r->val)); sp = p; gbranch(OGOTO); @@ -61,7 +61,7 @@ swit1(C1 *q, int nc, int32 def, Node *n) swit1(q, i, def, n); if(debug['W']) - print("case < %.8lux\n", r->val); + print("case < %.8ux\n", r->val); patch(sp, pc); swit1(r+1, nc-i-1, def, n); } @@ -564,7 +564,7 @@ align(int32 i, Type *t, int op) } o = xround(o, w); if(debug['A']) - print("align %s %ld %T = %ld\n", bnames[op], i, t, o); + print("align %s %d %T = %d\n", bnames[op], i, t, o); return o; } diff --git a/src/cmd/8g/gsubr.c b/src/cmd/8g/gsubr.c index 42794a5784..b686add837 100644 --- a/src/cmd/8g/gsubr.c +++ b/src/cmd/8g/gsubr.c @@ -715,7 +715,7 @@ gclean(void) for(i=D_AL; i<=D_DI; i++) if(reg[i]) - yyerror("reg %R left allocated at %lux", i, regpc[i]); + yyerror("reg %R left allocated at %ux", i, regpc[i]); } int32 @@ -772,7 +772,7 @@ regalloc(Node *n, Type *t, Node *o) fprint(2, "registers allocated at\n"); for(i=D_AX; i<=D_DI; i++) - fprint(2, "\t%R\t%#lux\n", i, regpc[i]); + fprint(2, "\t%R\t%#ux\n", i, regpc[i]); yyerror("out of fixed registers"); goto err; diff --git a/src/cmd/8g/list.c b/src/cmd/8g/list.c index 7438a6521c..edb1ece84a 100644 --- a/src/cmd/8g/list.c +++ b/src/cmd/8g/list.c @@ -56,18 +56,18 @@ Pconv(Fmt *fp) snprint(scale, sizeof scale, "%d,", p->from.scale); switch(p->as) { default: - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%s%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%D", p->loc, p->lineno, p->as, &p->from, scale, &p->to); break; case ADATA: sconsize = p->from.scale; - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D/%d,%D", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D/%d,%D", p->loc, p->lineno, p->as, &p->from, sconsize, &p->to); break; case ATEXT: - snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%s%lD", + snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%lD", p->loc, p->lineno, p->as, &p->from, scale, &p->to); break; } diff --git a/src/cmd/8g/reg.c b/src/cmd/8g/reg.c index 3e57916c73..ae9a5f2eaf 100644 --- a/src/cmd/8g/reg.c +++ b/src/cmd/8g/reg.c @@ -612,17 +612,17 @@ brk: print("\nstats\n"); if(ostats.ncvtreg) - print(" %4ld cvtreg\n", ostats.ncvtreg); + print(" %4d cvtreg\n", ostats.ncvtreg); if(ostats.nspill) - print(" %4ld spill\n", ostats.nspill); + print(" %4d spill\n", ostats.nspill); if(ostats.nreload) - print(" %4ld reload\n", ostats.nreload); + print(" %4d reload\n", ostats.nreload); if(ostats.ndelmov) - print(" %4ld delmov\n", ostats.ndelmov); + print(" %4d delmov\n", ostats.ndelmov); if(ostats.nvar) - print(" %4ld delmov\n", ostats.nvar); + print(" %4d delmov\n", ostats.nvar); if(ostats.naddr) - print(" %4ld delmov\n", ostats.naddr); + print(" %4d delmov\n", ostats.naddr); memset(&ostats, 0, sizeof(ostats)); } @@ -1378,7 +1378,7 @@ dumpone(Reg *r) int z; Bits bit; - print("%ld:%P", r->loop, r->prog); + print("%d:%P", r->loop, r->prog); for(z=0; zset.b[z] | @@ -1427,14 +1427,14 @@ dumpit(char *str, Reg *r0) if(r1 != R) { print(" pred:"); for(; r1 != R; r1 = r1->p2link) - print(" %.4lud", r1->prog->loc); + print(" %.4ud", r1->prog->loc); print("\n"); } // r1 = r->s1; // if(r1 != R) { // print(" succ:"); // for(; r1 != R; r1 = r1->s1) -// print(" %.4lud", r1->prog->loc); +// print(" %.4ud", r1->prog->loc); // print("\n"); // } } diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c index 27e991279c..b76d731e1e 100644 --- a/src/cmd/8l/asm.c +++ b/src/cmd/8l/asm.c @@ -483,7 +483,7 @@ asmb(void) asmins(p); if(p->pc != expectpc) { Bflush(&bso); - diag("phase error %lux sb %lux in %s", p->pc, expectpc, TNAME); + diag("phase error %ux sb %ux in %s", p->pc, expectpc, TNAME); } while(pc < p->pc) { cput(0x90); // nop @@ -494,14 +494,14 @@ asmb(void) Bflush(&bso); if(!debug['a']) print("%P\n", curp); - diag("phase error %lux sb %lux in %s", p->pc, pc, TNAME); + diag("phase error %ux sb %ux in %s", p->pc, pc, TNAME); pc = p->pc; } if(HEADTYPE != 8) { asmins(p); if(pc != p->pc) { Bflush(&bso); - diag("asmins changed pc %lux sb %lux in %s", p->pc, pc, TNAME); + diag("asmins changed pc %ux sb %ux in %s", p->pc, pc, TNAME); } } if(cbc < sizeof(and)) diff --git a/src/cmd/8l/list.c b/src/cmd/8l/list.c index 3b07b5c3b6..6e17fbe926 100644 --- a/src/cmd/8l/list.c +++ b/src/cmd/8l/list.c @@ -103,7 +103,7 @@ Dconv(Fmt *fp) i = a->type; if(i >= D_INDIR && i < 2*D_INDIR) { if(a->offset) - snprint(str, sizeof str, "%ld(%R)", (long)a->offset, i-D_INDIR); + snprint(str, sizeof str, "%d(%R)", a->offset, i-D_INDIR); else snprint(str, sizeof str, "(%R)", i-D_INDIR); goto brk; @@ -121,44 +121,44 @@ Dconv(Fmt *fp) case D_BRANCH: if(bigP != P && bigP->pcond != P) if(a->sym != S) - snprint(str, sizeof str, "%lux+%s", bigP->pcond->pc, + snprint(str, sizeof str, "%ux+%s", bigP->pcond->pc, a->sym->name); else - snprint(str, sizeof str, "%lux", bigP->pcond->pc); + snprint(str, sizeof str, "%ux", bigP->pcond->pc); else - snprint(str, sizeof str, "%ld(PC)", a->offset); + snprint(str, sizeof str, "%d(PC)", a->offset); break; case D_EXTERN: - snprint(str, sizeof str, "%s+%ld(SB)", xsymname(a->sym), a->offset); + snprint(str, sizeof str, "%s+%d(SB)", xsymname(a->sym), a->offset); break; case D_STATIC: - snprint(str, sizeof str, "%s<%d>+%ld(SB)", xsymname(a->sym), + snprint(str, sizeof str, "%s<%d>+%d(SB)", xsymname(a->sym), a->sym->version, a->offset); break; case D_AUTO: - snprint(str, sizeof str, "%s+%ld(SP)", xsymname(a->sym), a->offset); + snprint(str, sizeof str, "%s+%d(SP)", xsymname(a->sym), a->offset); break; case D_PARAM: if(a->sym) - snprint(str, sizeof str, "%s+%ld(FP)", a->sym->name, a->offset); + snprint(str, sizeof str, "%s+%d(FP)", a->sym->name, a->offset); else - snprint(str, sizeof str, "%ld(FP)", a->offset); + snprint(str, sizeof str, "%d(FP)", a->offset); break; case D_CONST: - snprint(str, sizeof str, "$%ld", a->offset); + snprint(str, sizeof str, "$%d", a->offset); break; case D_CONST2: - snprint(str, sizeof str, "$%ld-%ld", a->offset, a->offset2); + snprint(str, sizeof str, "$%d-%d", a->offset, a->offset2); break; case D_FCONST: - snprint(str, sizeof str, "$(%.8lux,%.8lux)", a->ieee.h, a->ieee.l); + snprint(str, sizeof str, "$(%.8ux,%.8ux)", a->ieee.h, a->ieee.l); break; case D_SCONST: diff --git a/src/cmd/8l/obj.c b/src/cmd/8l/obj.c index b50632c850..1238ebf787 100644 --- a/src/cmd/8l/obj.c +++ b/src/cmd/8l/obj.c @@ -210,7 +210,7 @@ main(int argc, char *argv[]) INITRND = 4; HEADR += (INITTEXT & 0xFFFF); if(debug['v']) - Bprint(&bso, "HEADR = 0x%ld\n", HEADR); + Bprint(&bso, "HEADR = 0x%d\n", HEADR); break; case 6: /* apple MACH */ /* @@ -283,10 +283,10 @@ main(int argc, char *argv[]) break; } if(INITDAT != 0 && INITRND != 0) - print("warning: -D0x%lux is ignored because of -R0x%lux\n", + print("warning: -D0x%ux is ignored because of -R0x%ux\n", INITDAT, INITRND); if(debug['v']) - Bprint(&bso, "HEADER = -H0x%ld -T0x%lux -D0x%lux -R0x%lux\n", + Bprint(&bso, "HEADER = -H0x%d -T0x%ux -D0x%ux -R0x%ux\n", HEADTYPE, INITTEXT, INITDAT, INITRND); Bflush(&bso); @@ -300,7 +300,7 @@ main(int argc, char *argv[]) zprg.from.scale = 1; zprg.to = zprg.from; - pcstr = "%.6lux "; + pcstr = "%.6ux "; nuxiinit(); histgen = 0; textp = nil; @@ -337,7 +337,7 @@ main(int argc, char *argv[]) undef(); if(debug['v']) { Bprint(&bso, "%5.2f cpu time\n", cputime()); - Bprint(&bso, "%ld symbols\n", nsymbol); + Bprint(&bso, "%d symbols\n", nsymbol); Bprint(&bso, "%d sizeof adr\n", sizeof(Adr)); Bprint(&bso, "%d sizeof prog\n", sizeof(Prog)); } @@ -511,7 +511,7 @@ loop: if(sig != 0){ if(s->sig != 0 && s->sig != sig) diag("incompatible type signatures" - "%lux(%s) and %lux(%s) for %s", + "%ux(%s) and %ux(%s) for %s", s->sig, s->file, sig, pn, s->name); s->sig = sig; s->file = pn; @@ -683,7 +683,7 @@ loop: goto casdef; if(p->from.type == D_FCONST) { /* size sb 9 max */ - sprint(literal, "$%lux", ieeedtof(&p->from.ieee)); + sprint(literal, "$%ux", ieeedtof(&p->from.ieee)); s = lookup(literal, 0); if(s->type == 0) { s->type = SBSS; @@ -721,7 +721,7 @@ loop: goto casdef; if(p->from.type == D_FCONST) { /* size sb 18 max */ - sprint(literal, "$%lux.%lux", + sprint(literal, "$%ux.%ux", p->from.ieee.l, p->from.ieee.h); s = lookup(literal, 0); if(s->type == 0) { diff --git a/src/cmd/8l/span.c b/src/cmd/8l/span.c index ec71121c3f..a5102e8911 100644 --- a/src/cmd/8l/span.c +++ b/src/cmd/8l/span.c @@ -147,7 +147,7 @@ start: xdefine("erodata", SRODATA, erodata); if(debug['v']) - Bprint(&bso, "etext = %lux\n", c); + Bprint(&bso, "etext = %ux\n", c); Bflush(&bso); for(cursym = textp; cursym != nil; cursym = cursym->next) cursym->value = cursym->text->pc; @@ -1233,7 +1233,7 @@ bad: } return; } - diag("doasm: notfound t2=%lux from=%lux to=%lux %P", t[2], p->from.type, p->to.type, p); + diag("doasm: notfound t2=%ux from=%ux to=%ux %P", t[2], p->from.type, p->to.type, p); return; mfound: diff --git a/src/cmd/8l/symtab.c b/src/cmd/8l/symtab.c index 66b68db03b..89a6457c44 100644 --- a/src/cmd/8l/symtab.c +++ b/src/cmd/8l/symtab.c @@ -73,7 +73,7 @@ putsymb(char *s, int t, int32 v, int ver, Sym *go) if(debug['n']) { if(t == 'z' || t == 'Z') { - Bprint(&bso, "%c %.8lux ", t, v); + Bprint(&bso, "%c %.8ux ", t, v); for(i=1; s[i] != 0 || s[i+1] != 0; i+=2) { f = ((s[i]&0xff) << 8) | (s[i+1]&0xff); Bprint(&bso, "/%x", f); @@ -82,9 +82,9 @@ putsymb(char *s, int t, int32 v, int ver, Sym *go) return; } if(ver) - Bprint(&bso, "%c %.8lux %s<%d> %s (%.8llux)\n", t, v, s, ver, go ? go->name : "", gv); + Bprint(&bso, "%c %.8ux %s<%d> %s (%.8llux)\n", t, v, s, ver, go ? go->name : "", gv); else - Bprint(&bso, "%c %.8lux %s\n", t, v, s, go ? go->name : "", gv); + Bprint(&bso, "%c %.8ux %s\n", t, v, s, go ? go->name : "", gv); } } @@ -159,6 +159,6 @@ asmsym(void) putsymb(a->asym->name, 'p', a->aoffset, 0, a->gotype); } if(debug['v'] || debug['n']) - Bprint(&bso, "symsize = %lud\n", symsize); + Bprint(&bso, "symsize = %ud\n", symsize); Bflush(&bso); } diff --git a/src/cmd/cc/acid.c b/src/cmd/cc/acid.c index eb7968c4f1..c6a6722bdc 100644 --- a/src/cmd/cc/acid.c +++ b/src/cmd/cc/acid.c @@ -150,7 +150,7 @@ acidmember(Type *t, int32 off, int flag) if(typesu[l->etype]) { s1 = acidsue(l->link); if(s1 != S) { - Bprint(&outbuf, " 'A' %s %ld %s;\n", + Bprint(&outbuf, " 'A' %s %d %s;\n", amap(s1->name), t->offset+off, amap(s->name)); break; @@ -189,7 +189,7 @@ acidmember(Type *t, int32 off, int flag) if(s == S) break; if(flag) { - Bprint(&outbuf, " '%c' %ld %s;\n", + Bprint(&outbuf, " '%c' %d %s;\n", acidchar[t->etype], t->offset+off, amap(s->name)); } else { Bprint(&outbuf, "\tprint(indent, \"%s\t\", addr.%s, \"\\n\");\n", @@ -209,7 +209,7 @@ acidmember(Type *t, int32 off, int flag) acidmember(l, t->offset+off, flag); Bprint(&outbuf, " };\n"); } else { - Bprint(&outbuf, " %s %ld %s;\n", + Bprint(&outbuf, " %s %d %s;\n", amap(s1->name), t->offset+off, amap(s->name)); } @@ -223,7 +223,7 @@ acidmember(Type *t, int32 off, int flag) } else { Bprint(&outbuf, "\tprint(indent, \"%s {\\n\");\n", amap(s1->name)); - Bprint(&outbuf, "\tindent_%s(addr+%ld, indent+\"\\t\");\n", + Bprint(&outbuf, "\tindent_%s(addr+%d, indent+\"\\t\");\n", amap(s1->name), t->offset+off); Bprint(&outbuf, "\tprint(indent, \"}\\n\");\n"); } @@ -263,7 +263,7 @@ acidtype(Type *t) if(debug['s']) goto asmstr; an = amap(s->name); - Bprint(&outbuf, "sizeof%s = %ld;\n", an, t->width); + Bprint(&outbuf, "sizeof%s = %d;\n", an, t->width); Bprint(&outbuf, "aggr %s\n{\n", an); for(l = t->link; l != T; l = l->down) acidmember(l, 0, 1); @@ -280,7 +280,7 @@ acidtype(Type *t) break; for(l = t->link; l != T; l = l->down) if(l->sym != S) - Bprint(&outbuf, "#define\t%s.%s\t%ld\n", + Bprint(&outbuf, "#define\t%s.%s\t%d\n", s->name, l->sym->name, l->offset); diff --git a/src/cmd/cc/dcl.c b/src/cmd/cc/dcl.c index b4d8c4d147..3aaa2c1559 100644 --- a/src/cmd/cc/dcl.c +++ b/src/cmd/cc/dcl.c @@ -195,7 +195,7 @@ doinit(Sym *s, Type *t, int32 o, Node *a) dbgdecl(s); } if(debug['i']) { - print("t = %T; o = %ld; n = %s\n", t, o, s->name); + print("t = %T; o = %d; n = %s\n", t, o, s->name); prtree(a, "doinit value"); } @@ -323,7 +323,7 @@ init1(Sym *s, Type *t, int32 o, int exflag) return Z; if(debug['i']) { - print("t = %T; o = %ld; n = %s\n", t, o, s->name); + print("t = %T; o = %d; n = %s\n", t, o, s->name); prtree(a, "init1 value"); } @@ -479,7 +479,7 @@ init1(Sym *s, Type *t, int32 o, int exflag) e = r->vconst; if(t->width != 0) if(e < 0 || e*w >= t->width) { - diag(a, "initialization index out of range: %ld", e); + diag(a, "initialization index out of range: %d", e); continue; } } @@ -916,7 +916,7 @@ fnproto1(Node *n) void dbgdecl(Sym *s) { - print("decl \"%s\": C=%s [B=%d:O=%ld] T=%T\n", + print("decl \"%s\": C=%s [B=%d:O=%d] T=%T\n", s->name, cnames[s->class], s->block, s->offset, s->type); } @@ -1571,7 +1571,7 @@ contig(Sym *s, Node *n, int32 v) Type *zt; if(debug['i']) { - print("contig v = %ld; s = %s\n", v, s->name); + print("contig v = %d; s = %s\n", v, s->name); prtree(n, "doinit value"); } diff --git a/src/cmd/cc/dpchk.c b/src/cmd/cc/dpchk.c index 046c0e4da9..65a7746d47 100644 --- a/src/cmd/cc/dpchk.c +++ b/src/cmd/cc/dpchk.c @@ -369,7 +369,7 @@ checkargs(Node *nn, char *s, int pos) continue; for(l=tprot; l; l=l->link) if(sametype(a->type, l->type)) { -/*print("checking %T/%ulx %T/%ulx\n", a->type, flag.b[0], l->type, l->flag.b[0]);*/ +/*print("checking %T/%ux %T/%ux\n", a->type, flag.b[0], l->type, l->flag.b[0]);*/ if(beq(flag, l->flag)) goto loop; } @@ -437,9 +437,9 @@ pragpack(void) ; if(debug['f']) if(packflg) - print("%4ld: pack %d\n", lineno, packflg); + print("%4d: pack %d\n", lineno, packflg); else - print("%4ld: pack off\n", lineno); + print("%4d: pack off\n", lineno); } void @@ -459,9 +459,9 @@ pragfpround(void) ; if(debug['f']) if(fproundflg) - print("%4ld: fproundflg %d\n", lineno, fproundflg); + print("%4d: fproundflg %d\n", lineno, fproundflg); else - print("%4ld: fproundflg off\n", lineno); + print("%4d: fproundflg off\n", lineno); } void @@ -477,7 +477,7 @@ pragtextflag(void) while(getnsc() != '\n') ; if(debug['f']) - print("%4ld: textflag %d\n", lineno, textflag); + print("%4d: textflag %d\n", lineno, textflag); } void diff --git a/src/cmd/cc/lex.c b/src/cmd/cc/lex.c index fd74edb9d2..3b413c246d 100644 --- a/src/cmd/cc/lex.c +++ b/src/cmd/cc/lex.c @@ -630,7 +630,7 @@ l1: vv = c; yylval.vval = convvtox(vv, TUCHAR); if(yylval.vval != vv) - yyerror("overflow in character constant: 0x%lx", c); + yyerror("overflow in character constant: 0x%x", c); else if(c & 0x80){ nearln = lineno; @@ -1410,11 +1410,11 @@ Lconv(Fmt *fp) strcat(str, " "); } if(a[i].line) - snprint(s, STRINGSZ, "%s:%ld[%s:%ld]", + snprint(s, STRINGSZ, "%s:%d[%s:%d]", a[i].line->name, l-a[i].ldel+1, a[i].incl->name, l-a[i].idel+1); else - snprint(s, STRINGSZ, "%s:%ld", + snprint(s, STRINGSZ, "%s:%d", a[i].incl->name, l-a[i].idel+1); if(strlen(s)+strlen(str) >= STRINGSZ-10) break; @@ -1463,7 +1463,7 @@ Tconv(Fmt *fp) n = t->width; if(t->link && t->link->width) n /= t->link->width; - sprint(s, "[%ld]", n); + sprint(s, "[%d]", n); if(strlen(str) + strlen(s) < STRINGSZ) strcat(str, s); } diff --git a/src/cmd/cc/pickle.c b/src/cmd/cc/pickle.c index fb7ec585b5..82cf5eb05d 100644 --- a/src/cmd/cc/pickle.c +++ b/src/cmd/cc/pickle.c @@ -143,7 +143,7 @@ picklemember(Type *t, int32 off) case TIND: if(s == S) Bprint(&outbuf, - "%s\"p\", (char*)addr+%ld+_i*%ld);\n", + "%s\"p\", (char*)addr+%d+_i*%d);\n", picklestr, t->offset+off, t->width); else Bprint(&outbuf, @@ -164,14 +164,14 @@ picklemember(Type *t, int32 off) case TFLOAT: case TDOUBLE: if(s == S) - Bprint(&outbuf, "%s\"%c\", (char*)addr+%ld+_i*%ld);\n", + Bprint(&outbuf, "%s\"%c\", (char*)addr+%d+_i*%d);\n", picklestr, picklechar[t->etype], t->offset+off, t->width); else Bprint(&outbuf, "%s\"%c\", &addr->%s);\n", picklestr, picklechar[t->etype], pmap(s->name)); break; case TARRAY: - Bprint(&outbuf, "\tfor(_i = 0; _i < %ld; _i++) {\n\t", + Bprint(&outbuf, "\tfor(_i = 0; _i < %d; _i++) {\n\t", t->width/t->link->width); picklemember(t->link, t->offset+off); Bprint(&outbuf, "\t}\n\t_i = 0;\n\tUSED(_i);\n"); @@ -183,7 +183,7 @@ picklemember(Type *t, int32 off) if(s1 == S) break; if(s == S) { - Bprint(&outbuf, "\tbp = pickle_%s(bp, ep, un, (%s*)((char*)addr+%ld+_i*%ld));\n", + Bprint(&outbuf, "\tbp = pickle_%s(bp, ep, un, (%s*)((char*)addr+%d+_i*%d));\n", pmap(s1->name), pmap(s1->name), t->offset+off, t->width); } else { Bprint(&outbuf, "\tbp = pickle_%s(bp, ep, un, &addr->%s);\n", @@ -235,7 +235,7 @@ pickletype(Type *t) break; for(l = t->link; l != T; l = l->down) if(l->sym != S) - Bprint(&outbuf, "#define\t%s.%s\t%ld\n", + Bprint(&outbuf, "#define\t%s.%s\t%d\n", s->name, l->sym->name, l->offset); diff --git a/src/cmd/cc/pswt.c b/src/cmd/cc/pswt.c index 02d4e64a05..891836c543 100644 --- a/src/cmd/cc/pswt.c +++ b/src/cmd/cc/pswt.c @@ -80,7 +80,7 @@ doswit(Node *n) qsort(iq, nc, sizeof(C1), swcmp); if(debug['W']) for(i=0; ixoffset); + print(" %d", n->xoffset); i = 0; break; case OINDREG: - print(" %ld(R%d)", n->xoffset, n->reg); + print(" %d(R%d)", n->xoffset, n->reg); i = 0; break; case OREGISTER: if(n->xoffset) - print(" %ld+R%d", n->xoffset, n->reg); + print(" %d+R%d", n->xoffset, n->reg); else print(" R%d", n->reg); i = 0; @@ -845,7 +845,7 @@ simplifyshift(Node *n) /* if(debug['h']) - print("%.3o %ld %ld %d #%.lux\n", + print("%.3o %d %d %d #%.ux\n", (s1<<3)|s2, c1, c2, topbit(c3), c3); */ diff --git a/src/cmd/cov/main.c b/src/cmd/cov/main.c index 1b3138a7f4..5ff22c00a3 100644 --- a/src/cmd/cov/main.c +++ b/src/cmd/cov/main.c @@ -81,7 +81,7 @@ ran(uvlong pc, uvlong epc) key.epc = pc+1; r = treeget(&breakpoints, &key); if(r == nil) - sysfatal("unchecked breakpoint at %#lux+%d", pc, (int)(epc-pc)); + sysfatal("unchecked breakpoint at %#llux+%d", pc, (int)(epc-pc)); // Might be that the tail of the sequence // was run already, so r->epc is before the end. diff --git a/src/cmd/gc/closure.c b/src/cmd/gc/closure.c index a24a03a496..eb70143665 100644 --- a/src/cmd/gc/closure.c +++ b/src/cmd/gc/closure.c @@ -158,7 +158,7 @@ walkclosure(Node *func, NodeList **init) // create the function xfunc = nod(ODCLFUNC, N, N); - snprint(namebuf, sizeof namebuf, "_func_%.3ld", ++closgen); + snprint(namebuf, sizeof namebuf, "_func_%.3d", ++closgen); xfunc->nname = newname(lookup(namebuf)); xfunc->nname->ntype = xtype; xfunc->nname->defn = xfunc; diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 9dd4a386a4..a0cb9b4f13 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -937,11 +937,11 @@ Lconv(Fmt *fp) if(debug['L']) fmtprint(fp, "%s/", pathname); if(a[i].line) - fmtprint(fp, "%s:%ld[%s:%ld]", + fmtprint(fp, "%s:%d[%s:%d]", a[i].line->name, lno-a[i].ldel+1, a[i].incl->name, lno-a[i].idel+1); else - fmtprint(fp, "%s:%ld", + fmtprint(fp, "%s:%d", a[i].incl->name, lno-a[i].idel+1); lno = a[i].incl->line - 1; // now print out start of this file } @@ -1020,10 +1020,10 @@ Jconv(Fmt *fp) fmtprint(fp, " a(%d)", n->addable); if(n->vargen != 0) - fmtprint(fp, " g(%ld)", n->vargen); + fmtprint(fp, " g(%d)", n->vargen); if(n->lineno != 0) - fmtprint(fp, " l(%ld)", n->lineno); + fmtprint(fp, " l(%d)", n->lineno); if(n->xoffset != 0) fmtprint(fp, " x(%lld)", n->xoffset); @@ -1377,7 +1377,7 @@ Tconv(Fmt *fp) case TARRAY: if(t->bound >= 0) - fmtprint(fp, "[%ld]%T", t->bound, t->type); + fmtprint(fp, "[%d]%T", t->bound, t->type); else fmtprint(fp, "[]%T", t->type); break; @@ -1431,7 +1431,7 @@ Nconv(Fmt *fp) fmtprint(fp, "%O%J", n->op, n); break; } - fmtprint(fp, "%O-%S G%ld%J", n->op, + fmtprint(fp, "%O-%S G%d%J", n->op, n->sym, n->vargen, n); goto ptyp; @@ -1477,7 +1477,7 @@ Nconv(Fmt *fp) break; } if(n->sym != S) - fmtprint(fp, " %S G%ld", n->sym, n->vargen); + fmtprint(fp, " %S G%d", n->sym, n->vargen); ptyp: if(n->type != T) @@ -2330,7 +2330,7 @@ frame(int context) case ONAME: if(flag) print("--- %s frame ---\n", p); - print("%O %S G%ld %T\n", n->op, n->sym, n->vargen, n->type); + print("%O %S G%d %T\n", n->op, n->sym, n->vargen, n->type); flag = 0; break; diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c index 44a14ef8d7..dae22f2816 100644 --- a/src/cmd/ld/lib.c +++ b/src/cmd/ld/lib.c @@ -897,7 +897,7 @@ asmlc(void) continue; } if(debug['O']) - Bprint(&bso, "\t\t%6ld", lcsize); + Bprint(&bso, "\t\t%6d", lcsize); v = (p->pc - oldpc) / MINLC; while(v) { s = 127; @@ -905,7 +905,7 @@ asmlc(void) s = v; cput(s+128); /* 129-255 +pc */ if(debug['O']) - Bprint(&bso, " pc+%ld*%d(%ld)", s, MINLC, s+128); + Bprint(&bso, " pc+%d*%d(%d)", s, MINLC, s+128); v -= s; lcsize++; } @@ -920,10 +920,10 @@ asmlc(void) cput(s); if(debug['O']) { if(s > 0) - Bprint(&bso, " lc+%ld(%d,%ld)\n", + Bprint(&bso, " lc+%d(%d,%d)\n", s, 0, s); else - Bprint(&bso, " lc%ld(%d,%ld)\n", + Bprint(&bso, " lc%d(%d,%d)\n", s, 0, s); Bprint(&bso, "%6llux %P\n", p->pc, p); @@ -934,14 +934,14 @@ asmlc(void) if(s > 0) { cput(0+s); /* 1-64 +lc */ if(debug['O']) { - Bprint(&bso, " lc+%ld(%ld)\n", s, 0+s); + Bprint(&bso, " lc+%d(%d)\n", s, 0+s); Bprint(&bso, "%6llux %P\n", p->pc, p); } } else { cput(64-s); /* 65-128 -lc */ if(debug['O']) { - Bprint(&bso, " lc%ld(%ld)\n", s, 64-s); + Bprint(&bso, " lc%d(%d)\n", s, 64-s); Bprint(&bso, "%6llux %P\n", p->pc, p); } @@ -955,7 +955,7 @@ asmlc(void) lcsize++; } if(debug['v'] || debug['O']) - Bprint(&bso, "lcsize = %ld\n", lcsize); + Bprint(&bso, "lcsize = %d\n", lcsize); Bflush(&bso); } diff --git a/src/cmd/nm/nm.c b/src/cmd/nm/nm.c index 978218bff3..e57492d184 100644 --- a/src/cmd/nm/nm.c +++ b/src/cmd/nm/nm.c @@ -132,7 +132,7 @@ doar(Biobuf *bp) for (offset = Boffset(bp);;offset += size) { size = nextar(bp, offset, membername); if (size < 0) { - error("phase error on ar header %ld", offset); + error("phase error on ar header %d", offset); return; } if (size == 0)