aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ljumptab.h2
-rw-r--r--lopcodes.c2
-rw-r--r--lopcodes.h2
-rw-r--r--lopnames.h2
-rw-r--r--lvm.c16
5 files changed, 12 insertions, 12 deletions
diff --git a/ljumptab.h b/ljumptab.h
index 8306f250..a24828bb 100644
--- a/ljumptab.h
+++ b/ljumptab.h
@@ -57,8 +57,8 @@ static const void *const disptab[NUM_OPCODES] = {
57&&L_OP_BANDK, 57&&L_OP_BANDK,
58&&L_OP_BORK, 58&&L_OP_BORK,
59&&L_OP_BXORK, 59&&L_OP_BXORK,
60&&L_OP_SHRI,
61&&L_OP_SHLI, 60&&L_OP_SHLI,
61&&L_OP_SHRI,
62&&L_OP_ADD, 62&&L_OP_ADD,
63&&L_OP_SUB, 63&&L_OP_SUB,
64&&L_OP_MUL, 64&&L_OP_MUL,
diff --git a/lopcodes.c b/lopcodes.c
index 092c3902..79ffbe25 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -53,8 +53,8 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
53 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BANDK */ 53 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BANDK */
54 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BORK */ 54 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BORK */
55 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BXORK */ 55 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BXORK */
56 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHRI */
57 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHLI */ 56 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHLI */
57 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHRI */
58 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADD */ 58 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADD */
59 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUB */ 59 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SUB */
60 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MUL */ 60 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_MUL */
diff --git a/lopcodes.h b/lopcodes.h
index 97870038..9ad21021 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -272,8 +272,8 @@ OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */
272OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */ 272OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */
273OP_BXORK,/* A B C R[A] := R[B] ~ K[C]:integer */ 273OP_BXORK,/* A B C R[A] := R[B] ~ K[C]:integer */
274 274
275OP_SHRI,/* A B sC R[A] := R[B] >> sC */
276OP_SHLI,/* A B sC R[A] := sC << R[B] */ 275OP_SHLI,/* A B sC R[A] := sC << R[B] */
276OP_SHRI,/* A B sC R[A] := R[B] >> sC */
277 277
278OP_ADD,/* A B C R[A] := R[B] + R[C] */ 278OP_ADD,/* A B C R[A] := R[B] + R[C] */
279OP_SUB,/* A B C R[A] := R[B] - R[C] */ 279OP_SUB,/* A B C R[A] := R[B] - R[C] */
diff --git a/lopnames.h b/lopnames.h
index 965cec9b..39df332f 100644
--- a/lopnames.h
+++ b/lopnames.h
@@ -45,8 +45,8 @@ static const char *const opnames[] = {
45 "BANDK", 45 "BANDK",
46 "BORK", 46 "BORK",
47 "BXORK", 47 "BXORK",
48 "SHRI",
49 "SHLI", 48 "SHLI",
49 "SHRI",
50 "ADD", 50 "ADD",
51 "SUB", 51 "SUB",
52 "MUL", 52 "MUL",
diff --git a/lvm.c b/lvm.c
index bde850ea..8ad4344a 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1476,23 +1476,23 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1476 op_bitwiseK(L, l_bxor); 1476 op_bitwiseK(L, l_bxor);
1477 vmbreak; 1477 vmbreak;
1478 } 1478 }
1479 vmcase(OP_SHRI) { 1479 vmcase(OP_SHLI) {
1480 StkId ra = RA(i); 1480 StkId ra = RA(i);
1481 TValue *rb = vRB(i); 1481 TValue *rb = vRB(i);
1482 int ic = GETARG_sC(i); 1482 int ic = GETARG_sC(i);
1483 lua_Integer ib; 1483 lua_Integer ib;
1484 if (tointegerns(rb, &ib)) { 1484 if (tointegerns(rb, &ib)) {
1485 pc++; setivalue(s2v(ra), luaV_shiftl(ib, -ic)); 1485 pc++; setivalue(s2v(ra), luaV_shiftl(ic, ib));
1486 } 1486 }
1487 vmbreak; 1487 vmbreak;
1488 } 1488 }
1489 vmcase(OP_SHLI) { 1489 vmcase(OP_SHRI) {
1490 StkId ra = RA(i); 1490 StkId ra = RA(i);
1491 TValue *rb = vRB(i); 1491 TValue *rb = vRB(i);
1492 int ic = GETARG_sC(i); 1492 int ic = GETARG_sC(i);
1493 lua_Integer ib; 1493 lua_Integer ib;
1494 if (tointegerns(rb, &ib)) { 1494 if (tointegerns(rb, &ib)) {
1495 pc++; setivalue(s2v(ra), luaV_shiftl(ic, ib)); 1495 pc++; setivalue(s2v(ra), luaV_shiftl(ib, -ic));
1496 } 1496 }
1497 vmbreak; 1497 vmbreak;
1498 } 1498 }
@@ -1538,14 +1538,14 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1538 op_bitwise(L, l_bxor); 1538 op_bitwise(L, l_bxor);
1539 vmbreak; 1539 vmbreak;
1540 } 1540 }
1541 vmcase(OP_SHR) {
1542 op_bitwise(L, luaV_shiftr);
1543 vmbreak;
1544 }
1545 vmcase(OP_SHL) { 1541 vmcase(OP_SHL) {
1546 op_bitwise(L, luaV_shiftl); 1542 op_bitwise(L, luaV_shiftl);
1547 vmbreak; 1543 vmbreak;
1548 } 1544 }
1545 vmcase(OP_SHR) {
1546 op_bitwise(L, luaV_shiftr);
1547 vmbreak;
1548 }
1549 vmcase(OP_MMBIN) { 1549 vmcase(OP_MMBIN) {
1550 StkId ra = RA(i); 1550 StkId ra = RA(i);
1551 Instruction pi = *(pc - 2); /* original arith. expression */ 1551 Instruction pi = *(pc - 2); /* original arith. expression */