This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Call for compiler help/advice: atomic builtins for v3
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, rth at redhat dot com,Ian Lance Taylor <ian at airs dot com>
- Date: Sun, 06 Nov 2005 12:03:54 +0100
- Subject: Re: Call for compiler help/advice: atomic builtins for v3
- References: <436DDC36.8070308@suse.de> <84fc9c000511060252q2aaccac7l479d763b05db1f3b@mail.gmail.com>
Richard Guenther wrote:
We could just provide fallback libcalls in libgcc
Indeed, this is an option. Not one I can implement myself quickly, but I
think the idea of issuing a library call when the builtin is not
available was actually meant to enable this kind of solution.
Can you work on it?
- though usually you
would want a fallback on a higher level to avoid too much overhead.
Well, we are talking about i386... But yes, that could make sense, for
example if you want to compile once both for i386 and i686 and obtain
decent performance everywhere. Consider, however, that currently we end
up doing a function call anyway, no inlining, so...
So - can't you work with some preprocessor magic and a define, if
the builtins are available?
I don't really understand this last remark of yours: is it an alternate
solution?!? Any preprocessor magic has to rely on a new preprocessor
builtin, in case, because there is no consistent, unequivocal way to
know whether the builtins are available for the actual target, we
already explored that some time ago, in our (SUSE) gcc-development list too.
Paolo.