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.h | |
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.h')
-rw-r--r-- | lopcodes.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.175 2017/11/30 13:16:43 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.176 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 | */ |
@@ -217,6 +217,10 @@ OP_POWI,/* A B sC R(A) := R(B) ^ C */ | |||
217 | OP_DIVI,/* A B sC R(A) := R(B) / C */ | 217 | OP_DIVI,/* A B sC R(A) := R(B) / C */ |
218 | OP_IDIVI,/* A B sC R(A) := R(B) // C */ | 218 | OP_IDIVI,/* A B sC R(A) := R(B) // C */ |
219 | 219 | ||
220 | OP_BANDK,/* A B C R(A) := R(B) & K(C):integer */ | ||
221 | OP_BORK,/* A B C R(A) := R(B) | K(C):integer */ | ||
222 | OP_BXORK,/* A B C R(A) := R(B) ~ K(C):integer */ | ||
223 | |||
220 | OP_SHRI,/* A B C R(A) := R(B) >> C */ | 224 | OP_SHRI,/* A B C R(A) := R(B) >> C */ |
221 | OP_SHLI,/* A B C R(A) := C << R(B) */ | 225 | OP_SHLI,/* A B C R(A) := C << R(B) */ |
222 | 226 | ||