On Mon, May 23, 2005 at 10:28:05AM +0200, Uros Bizjak wrote:
> This change is needed to get i387 status word switching instructions in
> (int)->(float) conversions out of the loops, i.e.:
> 
> int i;
> double d;
> 
> for (x = 0... {
>    i[x] = d[x];
> }

I think it would also be very useful to have these instructions available as
builtins (they don't seem to be at the moment), in order to implement
fegetround() and fesetround() for example.

These functions are very useful to implement interval arithmetic, and if the
compiler knew how to optimize away some of these instructions, that would be
_really_ nice.  For example : remove a rounding mode change when it is
followed by another one, or remove a rounding mode change when the compiler
knows that the rounding mode has previously been changed to that one, etc.

-- 
Sylvain

Reply via email to