lua-users home
lua-l archive

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

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.

On Tue, Jan 4, 2011 at 7:21 PM, KHMan <> wrote:
> 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.
> --
> Cheers,
> Kein-Hong Man (esq.)
> Kuala Lumpur, Malaysia