Local tee
The local.tee
instruction sets the value of a local variable and loads the value onto the stack.
The instruction is named after the T-splitter used in plumbing.
Try it
Syntax
wasm
;; load the number 2 onto the stack
i32.const 2
;; store the number 2 in the variable $val and load it on the stack
local.tee $val
Instruction | Binary opcode |
---|---|
local.tee |
0x22 |