tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Implementing gcc intrinsics


From: Vladimir Vissoultchev
Subject: Re: [Tinycc-devel] Implementing gcc intrinsics
Date: Wed, 13 Apr 2016 12:21:37 +0300

I can see that for inlines there is a separate `InlineFunc` struct that
keeps function body until end of generation when in `gen_inline_functions`
only the referenced inlines are generated as regular functions.

The macro idea will be hard to impl as the inline body expansion will need
separate scope, similar to inline assembly. Btw, converting an inline
function body to assembly and defining a macro to emit __asm__ blocks looks
like possible route for scoping impl, though this asm generation has to be
platform dependent and function complexity will be an issue.

My intrinsics to macros hacks turned quite useful for LuaJIT compilation.
The funny thing is that the tracing JIT part works too. I needed the '.' in
asm labels patch for LuaJIT VM build which is emitted as an .S file during
compilation when targetting ELF object files.

I see that in TODO there is a note about __builtin_expect in missing
features. Until this gets impl as codegen hint a simple macro is a working
alternative IMO.

cheers,
</wqw>

-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Sergey Korshunoff
Sent: Wednesday, April 13, 2016 12:02 PM
To: address@hidden
Subject: Re: [Tinycc-devel] Implementing gcc intrinsics

> Actually, is there support for inlines in tcc?

No, tcc don't inline functions. From tcc-doc.texi: inline keyword is ignored
But I thinks it is not so difficult to implement this in preprocessor (like
macro)

_______________________________________________
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]