br
The br
statement branches to a loop, block, or if.
br
的其他变体有 br_if
用于根据条件进行分支,以及 br_table
用于根据参数分支到不同的块。
试一下
语法
wasm
;; label the loop so that it can be branched to
(loop $my_loop
;; branch to the loop.
;; most of the time you'll want to put this in an if statement and only branch on condition,
;; otherwise you have an infinite loop.
br $my_loop
)
指令 | 二进制操作码 |
---|---|
br |
0x0c |
br_if |
0x0d |
br_table |
0x0e |