new opcodes BANDK/BORK/BXORK. (They do not use immediate operands

because, too often, masks in bitwise operations are integers larger
than one byte.)
This commit is contained in:
Roberto Ierusalimschy
2017-12-13 16:32:09 -02:00
parent 36cf8f3a3c
commit 86431a2f1c
7 changed files with 107 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.h,v 1.175 2017/11/30 13:16:43 roberto Exp roberto $
** $Id: lopcodes.h,v 1.176 2017/12/04 17:41:30 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -217,6 +217,10 @@ OP_POWI,/* A B sC R(A) := R(B) ^ C */
OP_DIVI,/* A B sC R(A) := R(B) / C */
OP_IDIVI,/* A B sC R(A) := R(B) // C */
OP_BANDK,/* A B C R(A) := R(B) & K(C):integer */
OP_BORK,/* A B C R(A) := R(B) | K(C):integer */
OP_BXORK,/* A B C R(A) := R(B) ~ K(C):integer */
OP_SHRI,/* A B C R(A) := R(B) >> C */
OP_SHLI,/* A B C R(A) := C << R(B) */