lua-users home
lua-l archive

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


Thanks for the pointers.
I am having hard time compiling the examples though..

For example the DynASM-example.tar.gz produces compile errors such as ("dynasm/dasm_x86.h:90:20: error: expected _expression_ before ‘struct")
I tried to compile something minimal on my own and got errors like "Dst_Ref was not declared in this scope"
Obviosly I am doing someting wrong..
I am using gcc under linux and LuaJIT-2.0.0-beta6

Gabi



On Fri, Apr 29, 2011 at 1:05 AM, Mike Pall <mikelu-1104@mike.de> wrote:
Gabi wrote:
> I would like to experiment with Lua's
> DynASM (as a fast general purpose JIT engine)
>
> I couldn't find any docs or references to help me with it. Does anybody even
> use it (outside of LuaJIT of course) ?

There's some general overview at: http://luajit.org/dynasm.html

But the LuaJIT sources are in fact the best way to learn about it.
I suggest to read the *.dasc and *.dash files in the LuaJIT 1.1.6
sources, since it's much easier to understand. For a new project
you should use the more recent DynASM from the LuaJIT 2.x sources.

Here's a simple test-driver to get you started. It just pipes
the machine code output to a disassembler (objdump):
 http://luajit.org/download/DynASM-example.tar.gz

More DynASM usage examples:
 http://paul.bluereboot.net/um/
 http://wrapl.sourceforge.net/index.html

There are many more people who've mailed me privately about it.
Not sure which of these projects are open source, though.

--Mike




--
Regards,
Gabi

http://bugspy.net