lua-users home
lua-l archive

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

Hi All,

On 5 November 2017 at 19:16, Dibyendu Majumdar <> wrote:
> On 28 September 2017 at 22:37, Dibyendu Majumdar <> wrote:
>> However, looking at the generated C code made me think ... perhaps it
>> is worth trying to write a hand-coded JIT compiler. The thing about
>> the generated code is that there is not a lot of stack usage - hence
>> register allocation is perhaps somewhat easier (i.e. mostly static
>> allocation, with some dynamic allocation). So just for fun and as a
>> learning exercise, I am planning to start a new JIT where I will use
>> the excellent 'dynasm' product from Mike Pall. Only X86-64 to start
>> with. If anyone wants to join in this adventure, you are welcome.
> I have started on this. If anyone here has expertise in assembler
> (X86-64) and is willing to answer my newbie questions - please let me
> know. I am happy to send questions off list to avoid cluttering the
> list with questions that are not relevant to this list. Code reviews
> of my work will also be very helpful.

I have implemented the basic shell and grand total of one bytecode
(OP_RETURN) so far! It took a while to sort out dynasm output on
Windows as some required bits were in LuaJIT rather than dynasm.

I would like to thank those who have offered to help me on the
assembly code where I am a novice. Here are the links if you would
like to have a look:

Source (dynasm and C):

My goal is to not only complete this implementation but make is so
that it is fully documented and accessible to anyone who wants to
understand it or work on it.

Feedback welcome!