aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
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.h
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 'lopcodes.h')
-rw-r--r--lopcodes.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/lopcodes.h b/lopcodes.h
index c5e9cf81..d07a6e2d 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -219,12 +219,6 @@ OP_NEWTABLE,/* A B C R(A) := {} */
219OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */ 219OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */
220 220
221OP_ADDI,/* A B sC R(A) := R(B) + C */ 221OP_ADDI,/* A B sC R(A) := R(B) + C */
222OP_SUBI,/* A B sC R(A) := R(B) - C */
223OP_MULI,/* A B sC R(A) := R(B) * C */
224OP_MODI,/* A B sC R(A) := R(B) % C */
225OP_POWI,/* A B sC R(A) := R(B) ^ C */
226OP_DIVI,/* A B sC R(A) := R(B) / C */
227OP_IDIVI,/* A B sC R(A) := R(B) // C */
228 222
229OP_ADDK,/* A B C R(A) := R(B) + K(C) */ 223OP_ADDK,/* A B C R(A) := R(B) + K(C) */
230OP_SUBK,/* A B C R(A) := R(B) - K(C) */ 224OP_SUBK,/* A B C R(A) := R(B) - K(C) */