lua-users home
lua-l archive

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


Dibyendu Majumdar wrote:
> I am interested in understanding some basic things about SLJIT.
> 
> a) Does it have a register allocator?

No

> b) Does the api need the user to manage virtual registers

Yes, you manage them yourself. Sljit is more like a real asm but
it's a barebone asm. There are only basic instructions available
(mov, arith plus few more). You can work with 3+2 scratch registers
and 3+2 "saved" registers. You have access to the stack but you
can't use it if you want to wrap your function into a C function
pointer. You can only use first three "saved" registers to pass
arguments.

-- 
Alex