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.c | |
parent | 9ed9f40f1e3674f9ed7ffbe73c0c9718782fe6cd (diff) | |
download | lua-github-8fbe9e3470295e3b70273fa32ef56459cc0b5201.tar.gz |
new opcodes with immediate integer operand for all arithmetic operations
Diffstat (limited to 'lopcodes.c')
-rw-r--r-- | lopcodes.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lopcodes.c,v 1.64 2017/09/26 18:14:45 roberto Exp roberto $ +** $Id: lopcodes.c,v 1.65 2017/09/28 16:53:29 roberto Exp roberto $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ @@ -38,6 +38,12 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { "NEWTABLE", "SELF", "ADDI", + "SUBI", + "MULI", + "MODI", + "POWI", + "DIVI", + "IDIVI", "ADD", "SUB", "MUL", @@ -99,6 +105,12 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { ,opmode(0, 1, iABC) /* OP_NEWTABLE */ ,opmode(0, 1, iABC) /* OP_SELF */ ,opmode(0, 1, iABC) /* OP_ADDI */ + ,opmode(0, 1, iABC) /* OP_SUBI */ + ,opmode(0, 1, iABC) /* OP_MULI */ + ,opmode(0, 1, iABC) /* OP_MODI */ + ,opmode(0, 1, iABC) /* OP_POWI */ + ,opmode(0, 1, iABC) /* OP_DIVI */ + ,opmode(0, 1, iABC) /* OP_IDIVI */ ,opmode(0, 1, iABC) /* OP_ADD */ ,opmode(0, 1, iABC) /* OP_SUB */ ,opmode(0, 1, iABC) /* OP_MUL */ |