aboutsummaryrefslogtreecommitdiff
path: root/ljumptab.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 /ljumptab.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 'ljumptab.h')
-rw-r--r--ljumptab.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/ljumptab.h b/ljumptab.h
index 1832c809..37fe1e25 100644
--- a/ljumptab.h
+++ b/ljumptab.h
@@ -45,12 +45,6 @@ static void *disptab[NUM_OPCODES] = {
45&&L_OP_NEWTABLE, 45&&L_OP_NEWTABLE,
46&&L_OP_SELF, 46&&L_OP_SELF,
47&&L_OP_ADDI, 47&&L_OP_ADDI,
48&&L_OP_SUBI,
49&&L_OP_MULI,
50&&L_OP_MODI,
51&&L_OP_POWI,
52&&L_OP_DIVI,
53&&L_OP_IDIVI,
54&&L_OP_ADDK, 48&&L_OP_ADDK,
55&&L_OP_SUBK, 49&&L_OP_SUBK,
56&&L_OP_MULK, 50&&L_OP_MULK,