This is the mail archive of the gcc@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: why not consfold sin(const)



On Sep 19, 2004, at 1:56 PM, Robert Dewar wrote:


Timothy J.Wood wrote:

How about defining a ctor for that .o file that calls the target's elementary function at run time and puts it a global created by the compiler?

Unnecessarily messy, it's not that hard to get hold of high precision elementary functions (the code is certainly immediately available in Ada, so it must be available in C).

Yes; but someone (I forget who) early in this thread said it was "impossible" since you couldn't simulate target-specific elementary functions (presumably they were assuming that the target would have ill-defined or buggy routines). I'm not saying you *should* do the ctor thing, it's more a proof of concept that its possible to exactly use the target functions. You'd obviously get better code if you didn't call the target functions since you could then process "2*sin(CONST)" into a constant.


-tim


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