Mail Archives: djgpp/2000/04/18/05:17:56
On Tue, 18 Apr 2000, Alexei A. Frounze wrote:
> > Where gcc produces considerably less efficient code, is when you have
> >
> > int i;
> > double a, b;
> >
> > i = (int)(a*b);
> >
> > Here, gcc always needs to save and restore the FPU control word, and
> > there are a few occurences of this type in Alexei's code. (I don't
> > blame gcc here, I think it is almost impossible to do much better
> > for a compiler.)
>
> Stupid thing. It doesn't have to save/load the state of FPU.
I thought you were already cured of that ``stupid GCC'' attitude ;-).
In fact, GCC has very good reasons to do this save/restore control
word thing, because the compiler has no other way to ensure that
rounding is done according to what the various standards supported by
GCC say.
- Raw text -