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]

ColdFire soft-float optimizations


I'm thinking about a set of optimizations for single precision
floating point(SPFP) on ColdFire cores that don't have an FPU.  These
optimizations make the assumption that the domain of the FP numbers do
not include NaN in any of its forms, and don't have to set errno.  I
know that this optimization is not IEEE compliant, so I'm wrangling
with which set of flags to enable this optimization under. I'm
wondering what combination of -ffast-math and
-funsafe-math-optimizations should to be turned on to enable these
optimizations.

As an example, for the absolute value of a SPFP value, the sign bit can
be cleared via an integer instruction instead of having to call out to
the FP library.  This would be valid for all normal SPFP values and
infinity. Also, a comparison of a SPFP value against a constant can be
handled via an signed/unsigned integer comparison depending on the
value of the constant.

All suggestions are appreciated.

-- 
Peter Barada
peter@the-baradas.com


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