delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/16/09:38:52

X-Spam-Check-By: sourceware.org
Message-ID: <ba40711f0702160638g3a417d26geb759544ea4f2cbf@mail.gmail.com>
Date: Fri, 16 Feb 2007 09:38:29 -0500
From: "Lev Bishop" <lev DOT bishop AT gmail DOT com>
To: "Andrew Makhorin" <mao AT gnu DOT org>, cygwin AT cygwin DOT com
Subject: Re: strange bug in gettimeofday function
In-Reply-To: <1433795387.20070216163624@gnu.org>
MIME-Version: 1.0
References: <13811889795 DOT 20070215071733 AT gnu DOT org> <er2v5b$nmj$1 AT sea DOT gmane DOT org> <106982500 DOT 20070216041231 AT gnu DOT org> <EE7C6A9E85BF2E3374078A69 AT qjunbur DOT quns DOT cam DOT ac DOT uk> <1433795387 DOT 20070216163624 AT gnu DOT org>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 2/16/07, Andrew Makhorin wrote:

> Nevertheless, you agree that if t0 > t1 then t0 - t1 cannot be exact
> zero in *any* floating-point model, don't you? Even if optimization is
> used, the compiler must not arbitrarily change the precision of the
> same floating-point variable.

The -ffloat-store compiler option is available for those programs who
are concerned with such details. This is your code compiled -O2 and
-f{no-,}float-store. The difference is one extra load instruction.

$ diff -u f-floatstore.s f-nofloatstore.s
--- f-floatstore.s      2007-02-16 04:26:19.117875000 -0500
+++ f-nofloatstore.s    2007-02-16 04:26:03.399125000 -0500
@@ -321,11 +321,10 @@
        fxch    %st(1)
 .stabn 68,0,12,LM12-_main
 LM12:
-       fstpl   -16(%ebp)
+       fstl    -16(%ebp)
+       fxch    %st(1)
 .stabn 68,0,13,LM13-_main
 LM13:
-       fldl    -16(%ebp)
-       fxch    %st(1)
        fucompp
        fnstsw  %ax
        sahf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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