delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/20/15:16:17

From: Eric Rudd <rudd AT cyberoptics DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Code to Fix sinh() in libm.a
Date: Wed, 20 May 1998 13:25:18 -0500
Organization: CyberOptics
Lines: 23
Message-ID: <3563200E.87AEA5D1@cyberoptics.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980520121146 DOT 24974D-100000 AT is>
Reply-To: rudd AT cyberoptics DOT com
NNTP-Posting-Host: rudd.cyberoptics.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019