Implement jump tables (#453)
* Add 'jump_table_entry' and 'indirect_jump' instructions. * Update CodeSink to keep track of code size. Pretty up clif-util's disassembly output. * Only disassemble the machine portion of output. Pretty print the read-only data after it. * Update switch frontend code to use new br_table instruction w/ default.
This commit is contained in:
committed by
Dan Gohman
parent
de1d82b4ba
commit
79cea5e18b
@@ -51,7 +51,9 @@ function %br_table(i32) {
|
||||
jt0 = jump_table ebb3, ebb1, 0, ebb2
|
||||
|
||||
ebb0(v0: i32):
|
||||
br_table v0, jt0
|
||||
br_table v0, ebb4, jt0
|
||||
|
||||
ebb4:
|
||||
trap oob
|
||||
|
||||
ebb1:
|
||||
|
||||
Reference in New Issue
Block a user