This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed math builtins patch (3x)
> From: Jim Wilson <wilson@tuliptree.org>
>
> Kaveh R. Ghazi wrote:
> > Patch for more math builtins
> > http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00309.html
>
Thanks for the review Jim!
> This seems reasonable, but it isn't clear if there is an immediate
> benefit to it.
The only immediate benefit are the function attributes. But it
provides the framework for future optimizations which I (and perhaps
others) will work on.
> You have copysign as ATTR_MATHFN_FPROUNDING, but it is just a bit field
> operation. This implementation is allowed by the IEEE FP standard.
> Appendix A of IEEE Std 754-1985 says that copysign may be a
> non-arithmetic operation. This is very similar to fabs which is already
> ATTR_CONST_NOTHROW_LIST.
Fixed, thanks for catching this.
> You have fma{f,l} as ATTR_MATHFN_FPROUNDING_ERRNO, but I don't see
> anything in the description about domain errors.
I was using the opengroup reference for the description, but looking
at it again all the possible errors are marked with [MX] as extensions
over ISO C.
http://www.opengroup.org/onlinepubs/007904975/functions/fma.html
> Otherwise this looks OK.
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
I also caught a mistake in the prototype for pow10 (should have only
one argument). Fixed that and installed.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu