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: [PATCH]: Use -frounding-math for builtins that care about rounding


On 3/3/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
Long ago, we setup builtin attributes on all the c math functions.  One of
the things we had to be mindful of was whether the math function was
affected by rounding mode.  If it was, we used -funsafe-math-optimizations
as a proxy to determine whether the rounding mode mattered to the user.
http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00232.html

Some time after that, we created a specific flag -frounding-math for this.
http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00104.html

The patch below changes the macro in builtins.def to honor that more
specific flag instead of -funsafe-math-optimizations.

Tested on sparc-sun-solaris2.10, no regressions.

Okay for mainline?

This is ok.


Thanks,
Richard.


2007-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>


        * builtins.def (ATTR_MATHFN_FPROUNDING): Rely on
        flag_rounding_math, not flag_unsafe_math_optimizations.


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