lua-users home
lua-l archive

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

On 1/5/2011 10:26 AM, beo wulf wrote:
Played with tcc before -- it's fast at assembling, but there's no
optimiations for the assembled code (in particular, it pushes
everything to the stack after every operation) -- i.e. -- the
generated code is _NOT_ fast.

That's a good point -- many people (elsewhere) who jump into tcc think it's a mature compiler that can do everything they wish for and replace gcc in their lives. But tcc does have a built-in assembler (IIRC) -- perhaps it is a better starting point than a blank slate.

An assembler in Lua reminds me of those Forth assemblers...

For OSes that have NX-type settings disabled, calling and executing a data snippet is trivial, so it's real easy to start such a project, but a big job to write a fairly complete one. A thousand or so instructions, and a lot of those are useful for high performance. AMD just dumped another new instruction set into gcc the other day, more bit manipulation, and a lot of new mnemonics.

It's pretty niche and hard to drum up support for. Probably the main coder needs to do >99% of the work. This sounds like something they throw grad students at.

On Tue, Jan 4, 2011 at 4:12 PM, Luiz Henrique de Figueiredo wrote:
As for why not C ? C is fine, but I'd prefer to not write out a *.c
file, call gcc, compile it to a *.so, and load it back in -- just
something self contained.

As suggested before, try luatcc.

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