lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 4 January 2015 at 22:26, Dibyendu Majumdar <> wrote:
> On 4 January 2015 at 06:41, Dirk Laurie <> wrote:
>> If you need more opcodes, I would go for one extra instruction
>> that exploits EXTRA_ARG to give the extra functionality.

> Yes I was wondering if there was a standard way to have a two word
> instruction - that way
> I can maintain bytecode compatibility with Lua.


I have been investigating the idea of using a pseudo opcode to
introduce a 64-bit instruction while retaining the existing 32-bit
instructions. However this appears to get complicated due to an
assumption in other places that the bytecode fits into a single 32-bit
field within the expression object in the parser/code generator.

      e-> = luaK_codeABC(fs, OP_NOT, 0, e->, 0);
      e->k = VRELOCABLE;