]> Cypherpunks repositories - gostls13.git/commitdiff
various: avoid %ld etc
authorRuss Cox <rsc@golang.org>
Wed, 13 Oct 2010 20:20:22 +0000 (16:20 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 13 Oct 2010 20:20:22 +0000 (16:20 -0400)
The Plan 9 tools assume that long is 32 bits.
We converted all instances of long to int32 when
importing the code but missed the print formats.
Because int32 is always int on the compilers we use,
it is never correct to use %lux, %ld, etc.  Convert to %ux, %d, etc.

(It matters because on 64-bit gcc, long is 64 bits,
so we were printing 32-bit quantities with 64-bit formats.)

R=ken2
CC=golang-dev
https://golang.org/cl/2491041

46 files changed:
src/cmd/5c/list.c
src/cmd/5c/mul.c
src/cmd/5c/reg.c
src/cmd/5c/swt.c
src/cmd/5g/list.c
src/cmd/5l/asm.c
src/cmd/5l/list.c
src/cmd/5l/obj.c
src/cmd/5l/pass.c
src/cmd/5l/span.c
src/cmd/5l/symtab.c
src/cmd/5l/thumb.c
src/cmd/6c/div.c
src/cmd/6c/mul.c
src/cmd/6c/reg.c
src/cmd/6c/swt.c
src/cmd/6g/list.c
src/cmd/6g/reg.c
src/cmd/6l/asm.c
src/cmd/6l/list.c
src/cmd/6l/obj.c
src/cmd/6l/symtab.c
src/cmd/8c/div.c
src/cmd/8c/mul.c
src/cmd/8c/reg.c
src/cmd/8c/swt.c
src/cmd/8g/gsubr.c
src/cmd/8g/list.c
src/cmd/8g/reg.c
src/cmd/8l/asm.c
src/cmd/8l/list.c
src/cmd/8l/obj.c
src/cmd/8l/span.c
src/cmd/8l/symtab.c
src/cmd/cc/acid.c
src/cmd/cc/dcl.c
src/cmd/cc/dpchk.c
src/cmd/cc/lex.c
src/cmd/cc/pickle.c
src/cmd/cc/pswt.c
src/cmd/cc/sub.c
src/cmd/cov/main.c
src/cmd/gc/closure.c
src/cmd/gc/subr.c
src/cmd/ld/lib.c
src/cmd/nm/nm.c

index c792c130da86a8ad9535c933c57d8a14c765bcc7..ab0fae83c2e7c6f0028b969fe59fcfd4e6144cda 100644 (file)
@@ -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:
index 121f67d5b55d8fa7d96b52f2ca6b7993e11d49c5..ff50c48456357b11adcad4f2984ed02d8e1b7c38 100644 (file)
@@ -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;
                }
        }
index f2d38d51963edc68f6a86eb0e5596cfa7aaff7a1..8c97944184a96df4800ff9795a842a6f9a50474a 100644 (file)
@@ -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; z<BITS; z++)
                                bit.b[z] = r->set.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);
                }
 
index cefbf53d9c8d0fded1670d024a2d2230800f906d..7740ad2e5feee3bb47654750951348c029b3e94e 100644 (file)
@@ -47,7 +47,7 @@ swit1(C1 *q, int nc, int32 def, Node *n)
        if(nc < 5) {
                for(i=0; i<nc; i++) {
                        if(debug['W'])
-                               print("case = %.8lux\n", q->val);
+                               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; i<nc; i++) {
                if(debug['W'])
-                       print("case = %.8lux\n", q->val);
+                       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;
 }
 
index 5add7e115440c2d2fadc6d749d0ab05fd4ad08db..6f0eeabfa8fb1fa364df205a9fefee1c6051bc2b 100644 (file)
@@ -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;
        }
index ef7f6da297990d9c1077b16d7696c2ea8d2fea4b..8262d2c396be32e0708f26df1fddda083d71da76 100644 (file)
@@ -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 */
index e75a1ecca5650a99c56d81dd43b1f0eeceb70823..666b03fde0a9059f94ba9fea74d87f0754e7c5cf 100644 (file)
@@ -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);
index 3e1cf4d979828e4ce8492294b258fb9bc0119d08..8232e29625fcb67a04b1fd747c5e204bf512608b 100644 (file)
@@ -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) {
index 0660dd252222bdff841fb1a24ec48c297336407c..8225a43fc77040dfcffd5823606fcc674bafc511 100644 (file)
@@ -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;
index 264073f98a4e5d002effb5f983bbf72d72e9b3c1..4a168870b1799fc5cab323b8c416fd207c236347 100644 (file)
@@ -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;
index eacb2f398aa54ccbace12dfc8b0f6f60d4e5eb9c..04e50fe1d48f4217fe8ffee0cdbc4982d3e61f73 100644 (file)
@@ -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);
 }
 
index 97292f640d9ca17b32b12114d88338abeac39a6b..db7e01bdd51320f5b5ea5b85eafe1056cbe5c722 100644 (file)
@@ -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);
index d67ef8df78bc71b9a4886fff75ad024b4bdf38eb..bad6c5e2772858abe1877e2e6cadcc684cd3c70e 100644 (file)
@@ -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);
index eefeacaeda2c4aa4e6d0326ffb29d140bebd2056..ab6883e7aa2a1a56d698e804d3390deefaac1847 100644 (file)
@@ -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;
 
index 431501202ed46edce30925ac3d2a8f13a4cfb87b..996128f75f3fe9912f10e7b578a808c5fc10c3d7 100644 (file)
@@ -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; z<BITS; z++)
                                bit.b[z] = r->use1.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;
index 668a1fdbcb0a50b2ab545c07b4a95be6b4abfacc..1597fdf34eba99bf70b860690b1cd6b4bc8600c4 100644 (file)
@@ -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;
 }
 
index 24e8bc70b9cbf0c3e8d19c8806a4de65329faa3c..c8077c97a1c33a09ae397fd6089be24f8b6fefbd 100644 (file)
@@ -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), "<nil>");
                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);
index e92740e04b3f14dfdd47a10d15ae2563aa834cc2..464627066389a989eab10a5af6cf2592a0cf6cec 100644 (file)
@@ -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; z<BITS; z++)
                bit.b[z] =
                        r->set.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");
 //             }
        }
index 1c3cade7f85abbc7c784a9f48cefa853de8c681d..fcca32748dbc79ec8a40500a8a4c0fdbba60dc65 100644 (file)
@@ -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);
index 770a2e99d4df6ae8fb2d58f60d9b6d61a567cf25..63b0d43bdaea55043115e0599835b9f758dbc6b7 100644 (file)
@@ -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:
index 338f0867496fffce034d767edaebb152b300e8d9..112199b61c95b647dfb018b07a7010f21304f72f 100644 (file)
@@ -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) {
index 61451882d4e737bafe138dd0c457f602b30ece6c..ef3e707e06c0ee4af2aa6328e33aff311f8e548a 100644 (file)
@@ -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);
 }
 
index 538e3522c0110700d548636c29a9c6afdb172bc7..14945052ea9c749c12e370696d8e36b14099d1be 100644 (file)
@@ -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);
index 2b7332d5414533a4cbf53416f1ae0789c5dbf213..a0742807eafab5d862a5b6439f1c35ee4ad9baec 100644 (file)
@@ -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;
 
index 837da2d04c077cd866f249b81b2fdd6f9bb013bc..6ba07bed281444d984330a9445a9b7311666e5c8 100644 (file)
@@ -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; z<BITS; z++)
                                bit.b[z] = r->use1.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);
                }
 
index 1c502f5ff34724c5c5bc8e43037021137c24c419..46a0290d9d8075d73fa5c5c5ed033b35e9be7a03 100644 (file)
@@ -40,7 +40,7 @@ swit1(C1 *q, int nc, int32 def, Node *n)
        if(nc < 5) {
                for(i=0; i<nc; i++) {
                        if(debug['W'])
-                               print("case = %.8lux\n", q->val);
+                               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;
 }
 
index 42794a578456674584df17c48dd5f81f68bfb5dc..b686add837e68deaf9808ef11ec1f8be6085ef98 100644 (file)
@@ -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;
 
index 7438a6521c3875197025949b0a06d1b2677bd023..edb1ece84ac4c7c0e2b39daf8c4174e491394097 100644 (file)
@@ -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;
        }
index 3e57916c7390463a71716bbdfb5740ed6687a782..ae9a5f2eafa0a4aed27af7081278da0d337bbbbf 100644 (file)
@@ -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; z<BITS; z++)
                bit.b[z] =
                        r->set.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");
 //             }
        }
index 27e991279cfe26596322c62a1ebc72f2f88fa2b8..b76d731e1eddb85810e0cdf407802bd1bc0be760 100644 (file)
@@ -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))
index 3b07b5c3b6bae81438f97ef57bc6f9bfd479b4aa..6e17fbe926abc7a94651948f33d46a79e9e66922 100644 (file)
@@ -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:
index b50632c850cac3534aa430929d627966481756a4..1238ebf787230588c69d4666e91344a65252154c 100644 (file)
@@ -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) {
index ec71121c3f2cf4d55b5f3c3af549262367da025e..a5102e8911a0d2544b4ea995afa70ce89a97394f 100644 (file)
@@ -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:
index 66b68db03b93ae537bc45db6c92e7cb06db8016e..89a6457c44e4fa9e70e020a21cac31459ac6edba 100644 (file)
@@ -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);
 }
index eb7968c4f1f887ba1f49c39b54766c2321a34b2e..c6a6722bdc7dcc444f07cc279cc06a48b2b938b2 100644 (file)
@@ -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);
index b4d8c4d1473d04c84b34d48aa14be1785b8bd172..3aaa2c155977a65f2dc5cf44f65cfdebbb764141 100644 (file)
@@ -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");
        }
 
index 046c0e4da9b8744f17f46905ee6ae6c1551b2ed1..65a7746d4745d2ba74bb68c9bc838d3d51f54350 100644 (file)
@@ -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
index fd74edb9d28b8b655fbc4ec1e75c7ef9dc5f9d71..3b413c246d7186aa979fc6e190e3867de126dcc0 100644 (file)
@@ -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);
                }
index fb7ec585b5b429afe793a393c36b956c00609fee..82cf5eb05dc051de143d028ce51b0e0ffc3b795e 100644 (file)
@@ -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);
index 02d4e64a05a469ba8a3fef505255119543941d40..891836c54341bd635a57bf70873dc13caf606337 100644 (file)
@@ -80,7 +80,7 @@ doswit(Node *n)
        qsort(iq, nc, sizeof(C1), swcmp);
        if(debug['W'])
        for(i=0; i<nc; i++)
-               print("case %2ld: = %.8llux\n", i, (vlong)iq[i].val);
+               print("case %2d: = %.8llux\n", i, (vlong)iq[i].val);
        for(i=0; i<nc-1; i++)
                if(iq[i].val == iq[i+1].val)
                        diag(n, "duplicate cases in switch %lld", (vlong)iq[i].val);
index 335d30bfb0b1a91b1435b0b2a1f9296faf45d723..e0d5df7190516ea11b86dde4c2fc8e91858a5bb1 100644 (file)
@@ -92,18 +92,18 @@ prtree1(Node *n, int d, int f)
        {
        case ONAME:
                print(" \"%F\"", n);
-               print(" %ld", n->xoffset);
+               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);
 */
 
index 1b3138a7f4472ee649b1bd737ddaae82d7cfbe75..5ff22c00a3499de5dedd978af2402bd2d08c810d 100644 (file)
@@ -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.
index a24a03a496cbcfa4f4bfd6b863b22110e916b5d5..eb70143665349bf45aa243c5c46a84ecc3e0e6fc 100644 (file)
@@ -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;
index 9dd4a386a4775e5691256f0a001936d95dc7a277..a0cb9b4f134187a0d66197fe4e2d868d779bf5ba 100644 (file)
@@ -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;
 
index 44a14ef8d7b28e1e81ef1905c2e570db113f5e93..dae22f281618b6b320aae1e4eca648077a2dc217 100644 (file)
@@ -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);
 }
 
index 978218bff3dd56bf48370cb42683ed167c6f842f..e57492d184fe224c8b8176ae15a4628ce085f386 100644 (file)
@@ -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)