aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-04 12:49:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-04 12:49:24 -0300
commit8fbe9e3470295e3b70273fa32ef56459cc0b5201 (patch)
tree21fcdfc75c622f5b015a1fcd131eef1b7701cc5d /lopcodes.h
parent9ed9f40f1e3674f9ed7ffbe73c0c9718782fe6cd (diff)
downloadlua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.tar.gz
lua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.tar.bz2
lua-8fbe9e3470295e3b70273fa32ef56459cc0b5201.zip
new opcodes with immediate integer operand for all arithmetic operations
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 5c0bb836..39f36aa7 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.163 2017/10/01 19:13:43 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.164 2017/10/02 22:51:32 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*/
@@ -201,6 +201,13 @@ OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */
201OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */ 201OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */
202 202
203OP_ADDI,/* A B C R(A) := R(B) + C */ 203OP_ADDI,/* A B C R(A) := R(B) + C */
204OP_SUBI,/* A B C R(A) := R(B) - C */
205OP_MULI,/* A B C R(A) := R(B) * C */
206OP_MODI,/* A B C R(A) := R(B) % C */
207OP_POWI,/* A B C R(A) := R(B) ^ C */
208OP_DIVI,/* A B C R(A) := R(B) / C */
209OP_IDIVI,/* A B C R(A) := R(B) // C */
210
204OP_ADD,/* A B C R(A) := R(B) + R(C) */ 211OP_ADD,/* A B C R(A) := R(B) + R(C) */
205OP_SUB,/* A B C R(A) := R(B) - R(C) */ 212OP_SUB,/* A B C R(A) := R(B) - R(C) */
206OP_MUL,/* A B C R(A) := R(B) * R(C) */ 213OP_MUL,/* A B C R(A) := R(B) * R(C) */