Parse the BranchTable instruction format.

Resolve the jump table reference immediately since all jump tables are declared
in the preamble.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-22 15:16:14 -07:00
parent 274671d12a
commit 20fc675fc0
3 changed files with 30 additions and 10 deletions

View File

@@ -38,11 +38,12 @@ ebb1(vx2: i32, vx3: f32):
brnz vx0, ebb0(vx2, vx3)
}
function jumptable() {
function jumptable(i32) {
jt0 = jump_table 0
jt1 = jump_table 0, 0, ebb0, ebb3, ebb1, ebb2
ebb0:
ebb0(vx0: i32):
br_table vx0, jt1
trap
ebb1: