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:
@@ -39,12 +39,6 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_NEWTABLE */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_SELF */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUBI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_MULI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_MODI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_POWI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_DIVI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_IDIVI */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDK */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUBK */
|
||||
,opmode(0, 0, 0, 0, 1, iABC) /* OP_MULK */
|
||||
|
||||
Reference in New Issue
Block a user