lua-users home
lua-l archive

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


Hi All,

On 25 November 2017 at 21:56, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>> 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 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:
>
> https://github.com/dibyendumajumdar/ravi/blob/master/vmbuilder/docs/vm-design.rst
>
> https://github.com/dibyendumajumdar/ravi/blob/master/vmbuilder/asm/vm-win64.asm
>
> Source (dynasm and C):
>
> https://github.com/dibyendumajumdar/ravi/blob/master/vmbuilder/src/vm_x64.dasc
>

I have a slightly annotated version of the asm output from Clang when
lvm.c is compiled with computed gotos enabled, Lua Hook disabled, and
bytecode decoding done LuaJIT style:

https://github.com/dibyendumajumdar/ravi/blob/master/vmbuilder/compiler-output/clang_lvm_compgoto_luajitbcdecode.s

What's interesting is that I am not at all sure that the hand-coded
assembly (https://github.com/dibyendumajumdar/ravi/blob/master/vmbuilder/asm/vm-win64.asm)
is looking any more efficient than the Clang optimized output! Of
course MSVC lacks computed goto support so on Windows there will be a
difference no doubt. I have not done any benchmarks yet, but will
report results here when I do.

Regards
Dibyendu