diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-04 01:21:34 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-04 01:21:34 +0000 |
commit | 45d6a88841f0db650d615522b1f6594ea72ceb7e (patch) | |
tree | dec4fac8ff8638b6a0d8749d52e66d0207eb161b /lcc/src/dag.c | |
parent | 6d9be1722b2221cae39b389ce218e93d73d99335 (diff) | |
download | ioquake3-aero-45d6a88841f0db650d615522b1f6594ea72ceb7e.tar.gz ioquake3-aero-45d6a88841f0db650d615522b1f6594ea72ceb7e.zip |
* Dewarninged the lcc and q3asm source
* Removed traditional target platforms from the lcc build. This might break
building lcc on Windows using nmake. Submit patches or be quiet :p
* Default target for lcc is now bytecode, so -Wf-target=bytecode is no longer
needed on the lcc command line
git-svn-id: svn://svn.icculus.org/quake3/trunk@132 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'lcc/src/dag.c')
-rw-r--r-- | lcc/src/dag.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lcc/src/dag.c b/lcc/src/dag.c index 8e0ddea..420cbe7 100644 --- a/lcc/src/dag.c +++ b/lcc/src/dag.c @@ -2,9 +2,9 @@ #define iscall(op) (generic(op) == CALL \ - || IR->mulops_calls \ + || (IR->mulops_calls \ && (generic(op)==DIV||generic(op)==MOD||generic(op)==MUL) \ - && ( optype(op)==U || optype(op)==I)) + && ( optype(op)==U || optype(op)==I))) static Node forest; static struct dag { struct node node; @@ -102,7 +102,7 @@ Node listnodes(Tree tp, int tlab, int flab) { Node p = NULL, l, r; int op; - assert(tlab || flab || tlab == 0 && flab == 0); + assert(tlab || flab || (tlab == 0 && flab == 0)); if (tp == NULL) return NULL; if (tp->node) @@ -172,8 +172,8 @@ Node listnodes(Tree tp, int tlab, int flab) { p = node(op, NULL, NULL, constant(ty, tp->u.v)); } break; case RIGHT: { if ( tp->kids[0] && tp->kids[1] && generic(tp->kids[1]->op) == ASGN - && (generic(tp->kids[0]->op) == INDIR - && tp->kids[0]->kids[0] == tp->kids[1]->kids[0] + && ((generic(tp->kids[0]->op) == INDIR + && tp->kids[0]->kids[0] == tp->kids[1]->kids[0]) || (tp->kids[0]->op == FIELD && tp->kids[0] == tp->kids[1]->kids[0]))) { assert(tlab == 0 && flab == 0); @@ -276,11 +276,11 @@ Node listnodes(Tree tp, int tlab, int flab) { unsigned int fmask = fieldmask(f); unsigned int mask = fmask<<fieldright(f); Tree q = tp->kids[1]; - if (q->op == CNST+I && q->u.v.i == 0 - || q->op == CNST+U && q->u.v.u == 0) + if ((q->op == CNST+I && q->u.v.i == 0) + || (q->op == CNST+U && q->u.v.u == 0)) q = bittree(BAND, x, cnsttree(unsignedtype, (unsigned long)~mask)); - else if (q->op == CNST+I && (q->u.v.i&fmask) == fmask - || q->op == CNST+U && (q->u.v.u&fmask) == fmask) + else if ((q->op == CNST+I && (q->u.v.i&fmask) == fmask) + || (q->op == CNST+U && (q->u.v.u&fmask) == fmask)) q = bittree(BOR, x, cnsttree(unsignedtype, (unsigned long)mask)); else { listnodes(q, 0, 0); @@ -621,11 +621,11 @@ static Node prune(Node forest) { return forest; } static Node visit(Node p, int listed) { - if (p) + if (p) { if (p->syms[2]) p = tmpnode(p); - else if (p->count <= 1 && !iscall(p->op) - || p->count == 0 && iscall(p->op)) { + else if ((p->count <= 1 && !iscall(p->op)) + || (p->count == 0 && iscall(p->op))) { p->kids[0] = visit(p->kids[0], 0); p->kids[1] = visit(p->kids[1], 0); } @@ -654,6 +654,7 @@ static Node visit(Node p, int listed) { if (!listed) p = tmpnode(p); }; + } return p; } static Node tmpnode(Node p) { |