diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-12-13 16:32:09 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-12-13 16:32:09 -0200 |
commit | 86431a2f1c668844c665f9d09e246de906b511d8 (patch) | |
tree | 643d503667b624d4faeecd6bed6cc51f9084cb00 /lopcodes.c | |
parent | 36cf8f3a3c44da00cc9255797153df3c02895379 (diff) | |
download | lua-86431a2f1c668844c665f9d09e246de906b511d8.tar.gz lua-86431a2f1c668844c665f9d09e246de906b511d8.tar.bz2 lua-86431a2f1c668844c665f9d09e246de906b511d8.zip |
new opcodes BANDK/BORK/BXORK. (They do not use immediate operands
because, too often, masks in bitwise operations are integers larger
than one byte.)
Diffstat (limited to 'lopcodes.c')
-rw-r--r-- | lopcodes.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.c,v 1.71 2017/11/29 16:57:36 roberto Exp roberto $ | 2 | ** $Id: lopcodes.c,v 1.72 2017/12/04 17:41:30 roberto Exp roberto $ |
3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -44,6 +44,9 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { | |||
44 | "POWI", | 44 | "POWI", |
45 | "DIVI", | 45 | "DIVI", |
46 | "IDIVI", | 46 | "IDIVI", |
47 | "BANDK", | ||
48 | "BORK", | ||
49 | "BXORK", | ||
47 | "SHRI", | 50 | "SHRI", |
48 | "SHLI", | 51 | "SHLI", |
49 | "ADD", | 52 | "ADD", |
@@ -119,6 +122,9 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
119 | ,opmode(0, 1, iABC) /* OP_POWI */ | 122 | ,opmode(0, 1, iABC) /* OP_POWI */ |
120 | ,opmode(0, 1, iABC) /* OP_DIVI */ | 123 | ,opmode(0, 1, iABC) /* OP_DIVI */ |
121 | ,opmode(0, 1, iABC) /* OP_IDIVI */ | 124 | ,opmode(0, 1, iABC) /* OP_IDIVI */ |
125 | ,opmode(0, 1, iABC) /* OP_BANDK */ | ||
126 | ,opmode(0, 1, iABC) /* OP_BORK */ | ||
127 | ,opmode(0, 1, iABC) /* OP_BXORK */ | ||
122 | ,opmode(0, 1, iABC) /* OP_SHRI */ | 128 | ,opmode(0, 1, iABC) /* OP_SHRI */ |
123 | ,opmode(0, 1, iABC) /* OP_SHLI */ | 129 | ,opmode(0, 1, iABC) /* OP_SHLI */ |
124 | ,opmode(0, 1, iABC) /* OP_ADD */ | 130 | ,opmode(0, 1, iABC) /* OP_ADD */ |