Difference between revisions of "WebAssembly/Instructions"
From Free Pascal wiki
Jump to navigationJump to searchm (→Instructions) |
m (→Instructions) |
||
Line 99: | Line 99: | ||
|'''call_indirect''' '''typeuse''' | |'''call_indirect''' '''typeuse''' | ||
|$11 | |$11 | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |'''drop''' | ||
+ | |$1A | ||
+ | |[t]→[] | ||
+ | | | ||
+ | |- | ||
+ | |'''select''' | ||
+ | |$1B | ||
+ | |[t t i32]→[t] | ||
+ | | | ||
+ | |- | ||
+ | |(reserved) | ||
+ | |$1C..$1F | ||
| | | | ||
| | | |
Revision as of 16:48, 11 September 2019
This page is created because it's annoying to constantly jump around the official WebAssembly documentation.
The page requires careful review as official specs are updated
Instructions
Instruction | Byte Code | Execution | Notes |
---|---|---|---|
unreachable | $00 |
|
|
nop | $01 |
|
|
block | $02 blocktype |
|
block must always be closed with end |
loop | $03 | ||
if | $04 | ||
else | $05 | can only be used with if. Only single else is allowed per if | |
end | $0B | end can only close block or loop clocks | |
br labelidx | $0C labelidx |
|
Branching - Unconditional
Branching is possible only within a block. The block itself defines labels where the branching can go to. |
br_if labelidx | $0D labelidx |
|
Branching - Conditional
Branching is possible only within a block. The block itself defines labels where the branching can go to. |
br_table vec(labelidxI) labelidx | $0E | ||
return | $0F | ||
call funcidx | $10 | ||
call_indirect typeuse | $11 | ||
drop | $1A | [t]→[] | |
select | $1B | [t t i32]→[t] | |
(reserved) | $1C..$1F |
See Also
- WebAssembly
- http://webassembly.github.io/spec/core/intro/index.html - official documentation