ColdFire soft-float optimizations

Peter Barada peter@the-baradas.com
Thu Jun 3 16:42:00 GMT 2004


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



More information about the Gcc mailing list