mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 18:01:30 +00:00
Fix the completely bogus handling of "x" in dag creation.
That made a complete mashup of attached identifiers :P
This commit is contained in:
parent
24553867a4
commit
39506881c0
1 changed files with 8 additions and 9 deletions
|
@ -231,7 +231,7 @@ make_dag (const sblock_t *block)
|
|||
for (s = block->statements; s; s = s->next) {
|
||||
operand_t *x = 0, *y = 0, *z = 0, *w = 0;
|
||||
dagnode_t *n = 0, *nx, *ny, *nz, *nw;
|
||||
daglabel_t *op;
|
||||
daglabel_t *op, *lx;
|
||||
int simp;
|
||||
|
||||
simp = find_operands (s, &x, &y, &z, &w);
|
||||
|
@ -258,22 +258,21 @@ make_dag (const sblock_t *block)
|
|||
n->next = dagnodes;
|
||||
dagnodes = n;
|
||||
}
|
||||
lx = operand_label (x);
|
||||
if ((nx = node (x))) {
|
||||
daglabel_t **l;
|
||||
for (l = &nx->identifiers; *l; l = &(*l)->next) {
|
||||
if (*l == nx->label) {
|
||||
if (*l == lx) {
|
||||
*l = (*l)->next;
|
||||
nx->label->next = 0;
|
||||
lx->next = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
nx = leaf_node (x);
|
||||
}
|
||||
if (nx) {
|
||||
nx->label->next = n->identifiers;
|
||||
n->identifiers = nx->label;
|
||||
nx->label->dagnode = n;
|
||||
if (lx) {
|
||||
lx->next = n->identifiers;
|
||||
n->identifiers = lx;
|
||||
lx->dagnode = n;
|
||||
}
|
||||
dag = n;
|
||||
// c = a * b
|
||||
|
|
Loading…
Reference in a new issue