br
Branch to a label depth.
core0x0C
Syntax
br
Stack Effect
label arity -> branchOpcode
- Hex
0x0C- Decimal
12- Bytes
[0x0c]- Encoding
0x0C <labelidx:u32-leb128>- Immediates
labelidx:u32-leb128— branch target depth
- Category
- control
Browser Support
Core WebAssembly instruction.
Validation Rules
- Operands and result types must match the instruction signature.
- The instruction must appear in a valid structured control context.
Common Mistakes
- Using the instruction with the wrong operand type.
- Forgetting that WAT validation is stack-typed.
(func $example
;; br example
)