Clarify br_table

From comments in
https://github.com/CraneStation/cranelift/issues/101#issuecomment-461284555
This commit is contained in:
Rett Berg
2019-02-06 22:05:06 -08:00
committed by Dan Gohman
parent 9f9c306091
commit 68479e6115

View File

@@ -143,6 +143,12 @@ br_table = Instruction(
Note that this branch instruction can't pass arguments to the targeted
blocks. Split critical edges as needed to work around this.
Do not confuse this with "tables" in WebAssembly. ``br_table`` is for
jump tables with destinations within the current function only -- think
of a ``match`` in Rust or a ``switch`` in C. If you want to call a
function in a dynamic library, that will typically use
``call_indirect``.
""",
ins=(x, EBB, JT), is_branch=True, is_terminator=True)