summaryrefslogtreecommitdiff
path: root/6/isel.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-07-05 11:36:46 -0700
committerOri Bernstein <ori@eigenstate.org>2015-07-05 11:36:46 -0700
commitcf357b748945f161ed4a4c7ebac9e1353f3307a3 (patch)
tree8d1f1991d97c37da7f7558454eafd4a46ee4d989 /6/isel.c
parent4fac3196061c75f159d37bd8e7e51dc64f0dd5df (diff)
downloadmc-cf357b748945f161ed4a4c7ebac9e1353f3307a3.tar.gz
Add proper support for a 'gap' variable.
'_' is now a reserved token.
Diffstat (limited to '6/isel.c')
-rw-r--r--6/isel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/6/isel.c b/6/isel.c
index ff5ebd8..f6385ce 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -544,6 +544,7 @@ Loc *selexpr(Isel *s, Node *n)
Loc *edx, *cl; /* x86 wants some hard-coded regs */
Node **args;
size_t al;
+ Op op;
args = n->expr.args;
edx = locphysreg(Redx);
@@ -698,8 +699,13 @@ Loc *selexpr(Isel *s, Node *n)
die("Unimplemented op %s", opstr[exprop(n)]);
break;
case Oset:
- assert(exprop(args[0]) == Ovar || exprop(args[0]) == Oderef);
+ op = exprop(args[0]);
+ assert(op == Ovar || op == Oderef || op == Ogap);
assert(!stacknode(args[0]));
+
+ if (op == Ogap)
+ break;
+
b = selexpr(s, args[1]);
if (exprop(args[0]) == Oderef)
a = memloc(s, args[0]->expr.args[0], mode(n));
@@ -740,6 +746,8 @@ Loc *selexpr(Isel *s, Node *n)
r = loc(s, n);
}
break;
+ case Ogap:
+ break;
case Oblit:
a = selexpr(s, args[0]);
r = selexpr(s, args[1]);