[hackers] [scc] [cc2-qbe] Add OADDR to QBE || Roberto E. Vargas Caballero
commit 68b2cfb72656cb84311084385d33bf4e82de462e
Author: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
AuthorDate: Fri Apr 22 23:56:48 2016 +0200
Commit: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
CommitDate: Sat Apr 23 00:33:49 2016 +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.
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 74bfff3..5f2ff87 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -258,7 +258,6 @@ cgen(Node *np)
case OBAND:
case OBOR:
case OBXOR:
- case OCPL:
case OEQ:
case ONE:
off = 0;
_AT_@ -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();
Received on Sat Apr 23 2016 - 21:36:58 CEST
This archive was generated by hypermail 2.3.0
: Sat Apr 23 2016 - 21:48:14 CEST