From 8fbe9e3470295e3b70273fa32ef56459cc0b5201 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 4 Oct 2017 12:49:24 -0300 Subject: new opcodes with immediate integer operand for all arithmetic operations --- lopcodes.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lopcodes.h') diff --git a/lopcodes.h b/lopcodes.h index 5c0bb836..39f36aa7 100644 --- a/lopcodes.h +++ b/lopcodes.h @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.h,v 1.163 2017/10/01 19:13:43 roberto Exp roberto $ +** $Id: lopcodes.h,v 1.164 2017/10/02 22:51:32 roberto Exp roberto $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ @@ -201,6 +201,13 @@ OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */ OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C):string] */ OP_ADDI,/* A B C R(A) := R(B) + C */ +OP_SUBI,/* A B C R(A) := R(B) - C */ +OP_MULI,/* A B C R(A) := R(B) * C */ +OP_MODI,/* A B C R(A) := R(B) % C */ +OP_POWI,/* A B C R(A) := R(B) ^ C */ +OP_DIVI,/* A B C R(A) := R(B) / C */ +OP_IDIVI,/* A B C R(A) := R(B) // C */ + OP_ADD,/* A B C R(A) := R(B) + R(C) */ OP_SUB,/* A B C R(A) := R(B) - R(C) */ OP_MUL,/* A B C R(A) := R(B) * R(C) */ -- cgit v1.2.3-55-g6feb