This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Accessing signgam from the middle-end for builtin lgamma
On 26 April 2007 16:26, Brian Dessent wrote:
> Dave Korn wrote:
>
>> On 25 April 2007 18:55, Kaveh R. GHAZI wrote:
>>
>>> I'd like to work on using MPFR to handle builtin lgamma.
>>
>> In what sense is it a builtin if it requires a library to be installed
>> and emits a call to a library function ??? I may not have understood what
>> you're trying to do here, but how would it be different from if the
>> compiler installed a header that said
>>
>> #define __builtin_lgamma lgamma /* Must have MPFR installed. */
>
> The builtin would run on the host at compile time, whereas the above
> would run on the target at runtime. I presume he's talking about using
> MPFR in the host compiler to simplify lgamma(constant), not actually
> causing any requirement on the target code to use or have MPFR.
Oh, that makes sense.
Kaveh, surely the answer is to just unconditionally emit something like
(set (mem (sym_ref "_signgam")) (const_int VALUE)))
and let the user worry about what happens if they haven't included the correct
header file?
cheers,
DaveK
--
Can't think of a witty .sigline today....