lua-users home
lua-l archive

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


Hi Alexander,

On 13 September 2017 at 23:06, Alexander Nasonov <alnsn@yandex.ru> wrote:
> Doug Currie wrote:
>> Have you considered SLJIT?
>>
>> https://sourceforge.net/projects/sljit/
>
> C API is very verbose. To see what I mean, take a look at my bpfjit code [1].
>

I am interested in understanding some basic things about SLJIT.

a) Does it have a register allocator?
b) Does the api need the user to manage virtual registers or is it
automatic like in LLVM or NanoJIT? By this I mean in NanoJIT one can
write something like this (this is shown in the format used by its
assembler):

two = immi 2
three = immi 3
res = addi two three
reti res

As you can see above the user does not have to maintain virtual
registers - you just operate on the result of instructions. This is
similar to LLVM's api, as well as libjit.

Regards
Dibyendu