commit 68b2cfb72656cb84311084385d33bf4e82de462e
parent 18152113a1cefc45b164a77e476e2b958744f8cc
Author: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
Date: Fri, 22 Apr 2016 23:56:48 +0200
[cc2-qbe] Add OADDR to QBE
OADDR is a nop in QBE, but we still have to transform the node in a
temporary node without creating a temporary symbol.
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
@@ -258,7 +258,6 @@ cgen(Node *np)
case OBAND:
case OBOR:
case OBXOR:
- case OCPL:
case OEQ:
case ONE:
off = 0;
@@ -285,15 +284,18 @@ cgen(Node *np)
case OELOOP:
return NULL;
case OCAST:
- assert(r == NULL);
return cast(np, l);
- case OPAR:
- case ONEG:
case OADDR:
- abort();
+ np->flags |= ISTMP;
+ np->op = OTMP;
+ np->u.sym = l->u.sym;
+ return np;
case OPTR:
np->left = load(load(l));
return tmpnode(np);
+ case OCPL:
+ case OPAR:
+ case ONEG:
case OINC:
case ODEC:
abort();