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.