diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-04 12:49:24 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-04 12:49:24 -0300 |
commit | 8fbe9e3470295e3b70273fa32ef56459cc0b5201 (patch) | |
tree | 21fcdfc75c622f5b015a1fcd131eef1b7701cc5d /lopcodes.c | |
parent | 9ed9f40f1e3674f9ed7ffbe73c0c9718782fe6cd (diff) | |
download | lua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.tar.gz lua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.tar.bz2 lua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.zip |
new opcodes with immediate integer operand for all arithmetic operations
Diffstat (limited to 'lopcodes.c')
-rw-r--r-- | lopcodes.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.c,v 1.64 2017/09/26 18:14:45 roberto Exp roberto $ | 2 | ** $Id: lopcodes.c,v 1.65 2017/09/28 16:53:29 roberto Exp roberto $ |
3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -38,6 +38,12 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { | |||
38 | "NEWTABLE", | 38 | "NEWTABLE", |
39 | "SELF", | 39 | "SELF", |
40 | "ADDI", | 40 | "ADDI", |
41 | "SUBI", | ||
42 | "MULI", | ||
43 | "MODI", | ||
44 | "POWI", | ||
45 | "DIVI", | ||
46 | "IDIVI", | ||
41 | "ADD", | 47 | "ADD", |
42 | "SUB", | 48 | "SUB", |
43 | "MUL", | 49 | "MUL", |
@@ -99,6 +105,12 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
99 | ,opmode(0, 1, iABC) /* OP_NEWTABLE */ | 105 | ,opmode(0, 1, iABC) /* OP_NEWTABLE */ |
100 | ,opmode(0, 1, iABC) /* OP_SELF */ | 106 | ,opmode(0, 1, iABC) /* OP_SELF */ |
101 | ,opmode(0, 1, iABC) /* OP_ADDI */ | 107 | ,opmode(0, 1, iABC) /* OP_ADDI */ |
108 | ,opmode(0, 1, iABC) /* OP_SUBI */ | ||
109 | ,opmode(0, 1, iABC) /* OP_MULI */ | ||
110 | ,opmode(0, 1, iABC) /* OP_MODI */ | ||
111 | ,opmode(0, 1, iABC) /* OP_POWI */ | ||
112 | ,opmode(0, 1, iABC) /* OP_DIVI */ | ||
113 | ,opmode(0, 1, iABC) /* OP_IDIVI */ | ||
102 | ,opmode(0, 1, iABC) /* OP_ADD */ | 114 | ,opmode(0, 1, iABC) /* OP_ADD */ |
103 | ,opmode(0, 1, iABC) /* OP_SUB */ | 115 | ,opmode(0, 1, iABC) /* OP_SUB */ |
104 | ,opmode(0, 1, iABC) /* OP_MUL */ | 116 | ,opmode(0, 1, iABC) /* OP_MUL */ |