aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-09-10 13:20:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-09-10 13:20:03 -0300
commit91dad09f65984048ae43c8894d18acb785c7092b (patch)
treeea6c23c54d8659677da6259047ddd0c8e0b7e643 /lopcodes.c
parent4518e5df24600cacdb3bab75d640348d28e8b769 (diff)
downloadlua-91dad09f65984048ae43c8894d18acb785c7092b.tar.gz
lua-91dad09f65984048ae43c8894d18acb785c7092b.tar.bz2
lua-91dad09f65984048ae43c8894d18acb785c7092b.zip
Removed arithmetic opcodes with immediate operand
The difference in performance between immediate operands and K operands does not seem to justify all those extra opcodes. We only keep OP_ADDI, due to its ubiquity and because the difference is a little more relevant. (Later, OP_SUBI will be implemented by OP_ADDI, negating the constant.)
Diffstat (limited to '')
-rw-r--r--lopcodes.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lopcodes.c b/lopcodes.c
index 619592ce..90d4cd1a 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -39,12 +39,6 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
39 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_NEWTABLE */ 39 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_NEWTABLE */
40 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SELF */ 40 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SELF */
41 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDI */ 41 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDI */
42 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUBI */
43 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MULI */
44 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MODI */
45 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_POWI */
46 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_DIVI */
47 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_IDIVI */
48 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDK */ 42 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDK */
49 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUBK */ 43 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUBK */
50 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MULK */ 44 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MULK */