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]

Re: i387 control word reg definition is missing


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


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