This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calls to built-in functions are not Binary Compatible


Andrew Haley wrote:
> Surely it is a bug, rather than a feature of this code, that it is > causing direct (non-BC) calls to Java functions to be made. Direct calls > to gcc/libc internal functions or inlining code is another matter.

gcc builtins are defined as either being optimized away (replaced with
some other code) or directly calling some library routine. I suppose
it's not impossible to hack gcc's expander so that it generates
indirect dispatch code instead, but I doubt it's worth doing just for
these routines.

Right. I'm surprised that it is a Java library routine that is called here, in the case where the argument is not optimized away. Previously I was under the impression that it the appropriate equivalent function from fdlibm/libm would be called directly.


Since the Java Math.* calls all just call the appropriate fdlibm function, we can just have it call those directly - thus avoiding any issues with name mangling.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]