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.)
This commit is contained in:
@@ -219,12 +219,6 @@ OP_NEWTABLE,/* A B C R(A) := {} */
|
||||
OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */
|
||||
|
||||
OP_ADDI,/* A B sC R(A) := R(B) + C */
|
||||
OP_SUBI,/* A B sC R(A) := R(B) - C */
|
||||
OP_MULI,/* A B sC R(A) := R(B) * C */
|
||||
OP_MODI,/* A B sC R(A) := R(B) % C */
|
||||
OP_POWI,/* A B sC R(A) := R(B) ^ C */
|
||||
OP_DIVI,/* A B sC R(A) := R(B) / C */
|
||||
OP_IDIVI,/* A B sC R(A) := R(B) // C */
|
||||
|
||||
OP_ADDK,/* A B C R(A) := R(B) + K(C) */
|
||||
OP_SUBK,/* A B C R(A) := R(B) - K(C) */
|
||||
|
||||
Reference in New Issue
Block a user