Mail Archives: djgpp/1998/05/20/15:16:17
Eli Zaretskii wrote:
> If you ask whether GCC emits instructions which change the x87 status
> word, then I don't think it does, at least in simple programs that I
> tried.
Did you mean changes to the x87 control word? The x87 status word is, of
course, set as a result of most floating-point instructions; gcc changes
the control word at various times also, but AFAIK gcc always saves and
restores the original state. For instance, if one writes
double x;
int ix;
...
ix = (int) x;
then gcc changes the control word from "round-to-nearest" to "round
towards zero", saves the number in ix, then changes the control word
back to its original state. Unfortunately, I have seen no documentation
that guarantees what that original state is.
-Eric Rudd
rudd AT cyberoptics DOT com
- Raw text -