diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-07-05 00:42:30 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-07-05 00:42:30 -0700 |
commit | 4fac3196061c75f159d37bd8e7e51dc64f0dd5df (patch) | |
tree | 8c6c4533e8e031a643cdc563f4dc7722f5de4c37 /6/isel.c | |
parent | bd225cf9a9ec5a2d3bd35c067d011729d8fb9ae0 (diff) | |
download | mc-4fac3196061c75f159d37bd8e7e51dc64f0dd5df.tar.gz |
Improve error messages.
Diffstat (limited to '6/isel.c')
-rw-r--r-- | 6/isel.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -268,6 +268,20 @@ static void selcjmp(Isel *s, Node *n, Node **args) g(s, Ijmp, l2, NULL); } +/* Generate variable length jump. There are 3 cases + * for this: + * + * 1) Short list: Simple comparison sequence. + * 2) Sparse list: binary search + * 3) Dense list: Jump table + * + * If a value is not in the jump table, then the 0th + * value is used. + */ +static void selvjmp(Isel *s, Node *n, Node **args) +{ +} + static Loc *binop(Isel *s, AsmOp op, Node *x, Node *y) { Loc *a, *b; @@ -711,9 +725,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 Ovjmp: + selvjmp(s, n, args); + break; case Olit: /* fall through */ r = loc(s, n); break; |