summaryrefslogtreecommitdiff
path: root/utils/vc/swt.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/vc/swt.c')
-rw-r--r--utils/vc/swt.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/utils/vc/swt.c b/utils/vc/swt.c
index cdc58e1b..65f90301 100644
--- a/utils/vc/swt.c
+++ b/utils/vc/swt.c
@@ -19,8 +19,8 @@ swit2(C1 *q, int nc, long def, Node *n, Node *tn)
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);
gmove(nodconst(q->val), tn);
gopcode(OEQ, n, tn, Z);
patch(p, q->label);
@@ -32,8 +32,8 @@ swit2(C1 *q, int nc, long def, Node *n, Node *tn)
}
i = nc / 2;
r = q+i;
- if(debug['W'])
- print("case > %.8lux\n", r->val);
+ if(debug['K'])
+ print("case > %.8llux\n", r->val);
gmove(nodconst(r->val), tn);
gopcode(OLT, tn, n, Z);
sp = p;
@@ -41,8 +41,8 @@ swit2(C1 *q, int nc, long def, Node *n, Node *tn)
patch(p, r->label);
swit2(q, i, def, n, tn);
- if(debug['W'])
- print("case < %.8lux\n", r->val);
+ if(debug['K'])
+ print("case < %.8llux\n", r->val);
patch(sp, pc);
swit2(r+1, nc-i-1, def, n, tn);
}
@@ -234,23 +234,6 @@ loop:
}
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(0));
- p->from.offset += o+e;
- p->reg = lw;
- p->to.type = D_SCONST;
- memmove(p->to.sval, a->cstring+e, lw);
- }
-}
-
-void
gextern(Sym *s, Node *a, long o, long w)
{
@@ -596,8 +579,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;
}