[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Adding an opcode
- From: Dibyendu Majumdar <mobile@...>
- Date: Fri, 9 Jan 2015 00:05:44 +0000
On 4 January 2015 at 22:26, Dibyendu Majumdar <firstname.lastname@example.org> wrote:
> On 4 January 2015 at 06:41, Dirk Laurie <email@example.com> 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->u.info = luaK_codeABC(fs, OP_NOT, 0, e->u.info, 0);
e->k = VRELOCABLE;