tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] how hard to add SSE2 opcodes ?


From: Basile Starynkevitch
Subject: Re: [Tinycc-devel] how hard to add SSE2 opcodes ?
Date: Thu, 10 Sep 2015 12:46:36 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Sep 10, 2015 at 12:32:00PM +0200, Anaël Seghezzi wrote:
> Hi all,
> 
> what would it take to add SSE2 opcodes to tcc assembler, at least for x64 ?
> 
> I'm working on a small interactive sandbox to play with C in realtime to 
> create small demos/games with graphics and sounds,
> a sort of mix of "ShaderToy" and "Pico8". I'm using TCC and it's all very 
> effective, it could just gain some speed with a bit of SSE2 instructions.
> 


You won't get much speed, because TCC is known to very quickly
generate poor machine code, e.g. without using the register
efficiently. BTW, having some efficient register allocator would speed
up the generated code significantly (independently of SSE2, you could
hope a 3x to 10x speedup), but then you'll need a real-sized compiler.

If execution speed of the generated code is a major concern, TCC is
not the right tool for you. You could consider using some JIT library.
See http://stackoverflow.com/a/12322672/841108 which gives more
references.

Regards.
-- 
Basile Starynkevitch           http://starynkevitch.net/Basile/
France



reply via email to

[Prev in Thread] Current Thread [Next in Thread]