diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-04 12:49:24 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-04 12:49:24 -0300 |
commit | 8fbe9e3470295e3b70273fa32ef56459cc0b5201 (patch) | |
tree | 21fcdfc75c622f5b015a1fcd131eef1b7701cc5d /lopcodes.h | |
parent | 9ed9f40f1e3674f9ed7ffbe73c0c9718782fe6cd (diff) | |
download | lua-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.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) */ | |||
201 | OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */ | 201 | OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */ |
202 | 202 | ||
203 | OP_ADDI,/* A B C R(A) := R(B) + C */ | 203 | OP_ADDI,/* A B C R(A) := R(B) + C */ |
204 | OP_SUBI,/* A B C R(A) := R(B) - C */ | ||
205 | OP_MULI,/* A B C R(A) := R(B) * C */ | ||
206 | OP_MODI,/* A B C R(A) := R(B) % C */ | ||
207 | OP_POWI,/* A B C R(A) := R(B) ^ C */ | ||
208 | OP_DIVI,/* A B C R(A) := R(B) / C */ | ||
209 | OP_IDIVI,/* A B C R(A) := R(B) // C */ | ||
210 | |||
204 | OP_ADD,/* A B C R(A) := R(B) + R(C) */ | 211 | OP_ADD,/* A B C R(A) := R(B) + R(C) */ |
205 | OP_SUB,/* A B C R(A) := R(B) - R(C) */ | 212 | OP_SUB,/* A B C R(A) := R(B) - R(C) */ |
206 | OP_MUL,/* A B C R(A) := R(B) * R(C) */ | 213 | OP_MUL,/* A B C R(A) := R(B) * R(C) */ |