diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/opcode.h | 1 | ||||
| -rw-r--r-- | include/mruby/ops.h | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/include/mruby/opcode.h b/include/mruby/opcode.h index a6c636cf8..987c5ad8f 100644 --- a/include/mruby/opcode.h +++ b/include/mruby/opcode.h @@ -36,6 +36,7 @@ enum mrb_insn { #define FETCH_BB() do {a=READ_B(); b=READ_B();} while (0) #define FETCH_BBB() do {a=READ_B(); b=READ_B(); c=READ_B();} while (0) #define FETCH_BS() do {a=READ_B(); b=READ_S();} while (0) +#define FETCH_BSS() do {a=READ_B(); b=READ_S(); c=READ_S();} while (0) #define FETCH_S() do {a=READ_S();} while (0) #define FETCH_W() do {a=READ_W();} while (0) diff --git a/include/mruby/ops.h b/include/mruby/ops.h index 43b8de638..87f48d2a9 100644 --- a/include/mruby/ops.h +++ b/include/mruby/ops.h @@ -1,11 +1,12 @@ /* operand types: - + Z: no operand (Z,Z,Z,Z) - + B: 8bit (B,S,B,B) - + BB: 8+8bit (BB,SB,BS,SS) - + BBB: 8+8+8bit (BBB,SBB,BSB,SSB) - + BS: 8+16bit (BS,SS,BS,BS) - + S: 16bit (S,S,S,S) - + W: 24bit (W,W,W,W) + + Z: no operand + + B: 8bit + + BB: 8+8bit + + BBB: 8+8+8bit + + BS: 8+16bit + + BSS: 8+16+16bit + + S: 16bit + + W: 24bit */ /*----------------------------------------------------------------------- @@ -27,6 +28,7 @@ OPCODE(LOADI_5, B) /* R(a) = mrb_int(5) */ OPCODE(LOADI_6, B) /* R(a) = mrb_int(6) */ OPCODE(LOADI_7, B) /* R(a) = mrb_int(7) */ OPCODE(LOADI16, BS) /* R(a) = mrb_int(b) */ +OPCODE(LOADI32, BSS) /* R(a) = mrb_int((b<<16)+c) */ OPCODE(LOADSYM, BB) /* R(a) = Syms(b) */ OPCODE(LOADSYM16, BS) /* R(a) = Syms(b) */ OPCODE(LOADNIL, B) /* R(a) = nil */ |
