ravi icon indicating copy to clipboard operation
ravi copied to clipboard

Instruction format - enable 8-bit operand A

Open dibyendumajumdar opened this issue 8 years ago • 1 comments

Currently the operand A in Ravi is 7 bits because of the need to make B and C 1-bit larger, and to enable a larger opcode. However, this creates a compatibility issue between Lua and Ravi as the maximum number of locals and up-values is affected by this. A solution is to ensure that the extra-bit is not needed by ensuring that the opcodes specify which operand is a constant.

dibyendumajumdar avatar Dec 11 '16 15:12 dibyendumajumdar

LuaJIT ensures that no op has both arguments as constants - so we can adopt this approach.

dibyendumajumdar avatar Jul 24 '20 16:07 dibyendumajumdar