why not consfold sin(const)

Timothy J.Wood tjw@omnigroup.com
Mon Sep 20 00:31:00 GMT 2004


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



More information about the Gcc mailing list