summaryrefslogtreecommitdiff
path: root/6/isel.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
commited8711e68e441e9884d734932373317834665833 (patch)
tree08a3f37550af1b6adb1ad912ee6df70fa6c1ceaf /6/isel.c
parentbd5fb6d0628831cde25f13e3fe461786d616a06e (diff)
downloadmc-ed8711e68e441e9884d734932373317834665833.tar.gz
Refactor code to add jump tables, and prepare to generate them.
Diffstat (limited to '6/isel.c')
-rw-r--r--6/isel.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/6/isel.c b/6/isel.c
index 22d763c..c044464 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -524,6 +524,12 @@ static Loc *gencall(Isel *s, Node *n)
return ret;
}
+void seljtab(Isel *s, Node *n, Node **args)
+{
+ dump(n, stdout);
+ die("jtab not yet implemented");
+}
+
Loc *selexpr(Isel *s, Node *n)
{
Loc *a, *b, *c, *d, *r;
@@ -711,9 +717,9 @@ Loc *selexpr(Isel *s, Node *n)
case Ocjmp:
selcjmp(s, n, args);
break;
- case Ojtab:
- die("jump tables not yet implemented\n");
- break;
+ case Ojtab:
+ seljtab(s, n, args);
+ break;
case Olit: /* fall through */
r = loc(s, n);
break;