From fa8668c77d181a5075dc56fb63d6fa087ab4b1d3 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 17 Jan 2020 09:28:21 +0900 Subject: 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. --- include/mruby/ops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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) */ -- cgit v1.2.3