lua-users home
lua-l archive

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


On 1/5/2011 12:14 PM, beo wulf wrote:
Re: tcc
I realized it's suboptimal only after trying it.

Re: full assembler
After more thinking, I don't need a full assembler -- all I want is
access to the MMX/SSE2/SSE3 instructions, to be able to allocate stack
space, and pass data back&  forth with lua.

Checking git master at http://repo.or.cz/w/tinycc.git, i386-asm.h has up to MMX instructions -- has been stuck at that for ages. grishka is doing some x64 work, but don't hold your breath.

Reading earlier postings, looks like the best currently available option has been mentioned very early on but you had other ideas on integration. Well, so it's either DynASM or new code. :-)

Why do you need MMX anyway? I thought people should regard it as deprecated already.

Not sure how much a short snippet will benefit, looks like perhaps you plan to call it as a custom instruction from the Lua VM, but you will still run into all the overhead and non-optimal memory access that the Lua VM needs to do. To escape that you need to say, JIT compile and all that. How would you call such a snippet too... I can see that something like native matrix transformation will be fast, but thinking in terms of function calls shouldn't hurt performance a lot and integration is straightforward. Interesting nonetheless.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia