first implementation of bitwise operators '&' (band), '|' (bor),

and '~' (bxor)
This commit is contained in:
Roberto Ierusalimschy
2013-12-18 12:12:03 -02:00
parent a948054a19
commit c0edab0f6d
11 changed files with 122 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.h,v 1.143 2013/04/26 13:07:53 roberto Exp roberto $
** $Id: lopcodes.h,v 1.144 2013/12/16 19:06:52 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -191,6 +191,9 @@ OP_MOD,/* A B C R(A) := RK(B) % RK(C) */
OP_POW,/* A B C R(A) := RK(B) ^ RK(C) */
OP_DIV,/* A B C R(A) := RK(B) / RK(C) */
OP_IDIV,/* A B C R(A) := RK(B) // RK(C) */
OP_BAND,/* A B C R(A) := RK(B) & RK(C) */
OP_BOR,/* A B C R(A) := RK(B) | RK(C) */
OP_BXOR,/* A B C R(A) := RK(B) ~ RK(C) */
OP_UNM,/* A B R(A) := -R(B) */
OP_NOT,/* A B R(A) := not R(B) */
OP_LEN,/* A B R(A) := length of R(B) */