diff options
| author | forsyth <forsyth@lavoro.terzarima.net> | 2013-06-03 21:01:14 +0000 |
|---|---|---|
| committer | forsyth <forsyth@lavoro.terzarima.net> | 2013-06-03 21:01:14 +0000 |
| commit | 45a20ab721a513710138340faff3d59a31c3e01e (patch) | |
| tree | eea29d2684c51cc73725b8992a2125bede48e118 /utils/8c/swt.c | |
| parent | cd8e99851af33e52bcdf8faf34f9d4e62fa0cbaf (diff) | |
sync compilers with Plan 9
remove 1[acl] 2[acl]
Diffstat (limited to 'utils/8c/swt.c')
| -rw-r--r-- | utils/8c/swt.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/utils/8c/swt.c b/utils/8c/swt.c index 46fd71eb..aad14717 100644 --- a/utils/8c/swt.c +++ b/utils/8c/swt.c @@ -9,8 +9,8 @@ swit1(C1 *q, int nc, long def, Node *n) if(nc < 5) { for(i=0; i<nc; i++) { - if(debug['W']) - print("case = %.8lux\n", q->val); + if(debug['K']) + print("case = %.8llux\n", q->val); gopcode(OEQ, n->type, n, nodconst(q->val)); patch(p, q->label); q++; @@ -21,8 +21,8 @@ swit1(C1 *q, int nc, long def, Node *n) } i = nc / 2; r = q+i; - if(debug['W']) - print("case > %.8lux\n", r->val); + if(debug['K']) + print("case > %.8llux\n", r->val); gopcode(OGT, n->type, n, nodconst(r->val)); sp = p; gbranch(OGOTO); @@ -30,8 +30,8 @@ swit1(C1 *q, int nc, long def, Node *n) patch(p, r->label); swit1(q, i, def, n); - if(debug['W']) - print("case < %.8lux\n", r->val); + if(debug['K']) + print("case < %.8llux\n", r->val); patch(sp, pc); swit1(r+1, nc-i-1, def, n); } @@ -128,23 +128,6 @@ outstring(char *s, long n) } void -sextern(Sym *s, Node *a, long o, long w) -{ - long e, lw; - - for(e=0; e<w; e+=NSNAME) { - lw = NSNAME; - if(w-e < lw) - lw = w-e; - gpseudo(ADATA, s, nodconst(0L)); - p->from.offset += o+e; - p->from.scale = lw; - p->to.type = D_SCONST; - memmove(p->to.sval, a->cstring+e, lw); - } -} - -void gextern(Sym *s, Node *a, long o, long w) { if(a->op == OCONST && typev[a->type->etype]) { @@ -512,8 +495,8 @@ align(long i, Type *t, int op) long maxround(long max, long v) { - v += SZ_LONG-1; + v = round(v, SZ_LONG); if(v > max) - max = round(v, SZ_LONG); + return v; return max; } |
