mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Update opcode.md to match the latest implementation
This commit is contained in:
@@ -7,19 +7,23 @@ reducing the memory consumption of mruby VM.
|
||||
# Instructions
|
||||
|
||||
Instructions are bytes. There can be 256 instructions. Currently, we
|
||||
have 94 instructions. Instructions can take 0 to 3 operands.
|
||||
have 106 instructions. Instructions can take 0 to 3 operands.
|
||||
|
||||
## operands
|
||||
|
||||
The size of operands can be either 8bits, 16bits or 24bits.
|
||||
In the table.1 below, the second field describes the size (and
|
||||
sign) of operands.
|
||||
In the table.1 below, the second field describes the size
|
||||
of operands.
|
||||
|
||||
- B: 8bit
|
||||
- S: 16bit
|
||||
- sS: signed 16bit
|
||||
- W: 24bit
|
||||
|
||||
If the first and second operands are of type `B` (8bits), they may be
|
||||
extended to 16bits by the operand extension instruction immediately
|
||||
preceding them.
|
||||
See also `OP_EXT1`, `OP_EXT2` and `OP_EXT3`.
|
||||
|
||||
## table.1 Instruction Table
|
||||
|
||||
| Instruction Name | Operand type | Semantics |
|
||||
|
||||
Reference in New Issue
Block a user