[PATCH] Support Cell SPU floating point
Tue Dec 18 06:15:00 GMT 2007
On Sep 5, 2007, at 10:11, Ian Lance Taylor wrote:
> re we sure that is correct? Why have we never needed this for any
> other processor? Most processors face these issues when folding
> single-precision floating-point constants. We seem to be happy to
> have gcc fold all floating-point constant operations in a higher
> precision. Why do we want to change this?
We need to be precise on telling GCC what mode to use. For that
the mode must be passed around. Doing that by itself should not
cause any change.
However, only when we have a choice, we can make decisions on
where to fold in which precision. For Ada, the language is
very precise about when folding should be done in infinite
precision (for static expressions) and in machine precision.
As we do most the infinite precision folding in the front end,
as well as all other obvious non-static folding, it might be
that I haven't noticed GCC always folds constant floating-point
expressions in double precision. However, I'm not sure that
is the case, and if it were, it would be a bug.
It is not a good model to have floating-point results randomly
change based on wether GCC decides to fold an expression or not.
More information about the Gcc-patches