tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Anaël Seghezzi
Subject: [Tinycc-devel] RE :Re: how hard to add SSE2 opcodes ?
Date: Thu, 10 Sep 2015 13:53:19 +0200

Yes, but we only have access to MMX opcodes now from inline assembly, not SSE2.
This assembly/intrinsics would not modify the compiler behavior.

Any hint about how hard it would be to add the SSE2 opcodes ?

I have a Clang/LLVM dynamic backend, but it's more than 50mb large (vs 150kb 
for tcc)
and not as fast to compile C. I'm not trying to achieve full speed, it's 
already quite good.

Thanks,
Anaël.


On jeu 10/09/15 13:06 , Christian JULLIEN <address@hidden> wrote:

> I think Anaël wants to add new macros to generate SSE2 instructions
> as it is done by gcc and VC++ intrinsics.
> Using those macros is as you were using ymm / xmm register directly
> in assembler.
> ----- message d'origine -----
> DE : "Basile Starynkevitch" 
> DATE jeu. 10/09/2015 12:46 (GMT +02:00)
> À :  "address@hidden" , "address@hidden" 
> OBJET : Re: [Tinycc-devel] how hard to add SSE2 opcodes ?
> 
> 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
> 
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 



reply via email to

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