summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-01-17 09:28:21 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-05-07 08:38:46 +0900
commitfa8668c77d181a5075dc56fb63d6fa087ab4b1d3 (patch)
tree6ff4773e5be236b2783f4dc47aaa2095bb4454d1 /include
parent47f5f887e892ce46fecd12ad97193a501e09accb (diff)
downloadmruby-fa8668c77d181a5075dc56fb63d6fa087ab4b1d3.tar.gz
mruby-fa8668c77d181a5075dc56fb63d6fa087ab4b1d3.zip
Add a new instruction `OP_LOADI16`.
Which loads 16bit integer to the register. The instruction number should be reorder on massive instruction refactoring. The instruction is added for `mruby/c` which had performance issue with `OP_EXT`. With this instruction, `mruby/c` VM can just raise errors on `OP_EXT` extension instructions.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/ops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/ops.h b/include/mruby/ops.h
index 2327c33fd..c8990ae43 100644
--- a/include/mruby/ops.h
+++ b/include/mruby/ops.h
@@ -115,3 +115,4 @@ OPCODE(EXT1, Z) /* make 1st operand 16bit */
OPCODE(EXT2, Z) /* make 2nd operand 16bit */
OPCODE(EXT3, Z) /* make 1st and 2nd operands 16bit */
OPCODE(STOP, Z) /* stop VM */
+OPCODE(LOADI16, BS) /* R(a) = mrb_int(b) */