unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Optimized gcc 4.3.0 build on Windows returns 0 secs for all time values of system-process-attributes
Date: Sat, 03 Jan 2009 17:33:20 +0200	[thread overview]
Message-ID: <uy6xsmmkf.fsf@gnu.org> (raw)
In-Reply-To: <f7ccd24b0901030553y6ace5091obad4fbc32044a4c9@mail.gmail.com>

> Date: Sat, 3 Jan 2009 14:53:25 +0100
> From: "Juanma Barranquero" <lekktu@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> On Sat, Jan 3, 2009 at 14:28, Juanma Barranquero <lekktu@gmail.com> wrote:
> 
> >> Could you please show the values of ft_kernel, stime_sec, and
> >> stime_usec after the last of the above 3 lines, namely after
> >>
> >>  stime_sec = tem1 * 0.000001L;
> >>
> >> ?
> 
> Hmm.
> 
> The inlined code that implements the fmodl() call seems to be modifying tem1;
> doing
> 
>   snprintf (buf, sizeof (buf), "tem1 (1) = %Lf\n", tem1);
> OutputDebugString (buf);
>   stime_usec = fmodl (tem1, 1000000.0L);
>   snprintf (buf, sizeof (buf), "tem1 (2) = %Lf\n", tem1);
> OutputDebugString (buf);
> 
> I get the following results:
> 
> tem1 (1) = 82703125.000000
> tem1 (2) = 703125.000000

That's a bug in GCC, I'd say: all these variables are in registers, so
it probably reuses one of the FP registers incorrectly.

What happens if you transpose these two lines:

  stime_usec = fmodl (tem1, 1000000.0L);
  stime_sec = tem1 * 0.000001L;

(and similarly for other ?time_* qualities)? does the code work again
then?  (Note that I reuse tem1 and tem2 twice in the code, so even if
transposition works, something else will need to be done to make all
of the function work correctly.)




  reply	other threads:[~2009-01-03 15:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 13:00 Optimized gcc 4.3.0 build on Windows returns 0 secs for all time values of system-process-attributes Juanma Barranquero
2008-12-31 17:29 ` dhruva
2008-12-31 19:12 ` Eli Zaretskii
2009-01-01  4:38   ` Juanma Barranquero
2009-01-01 12:57     ` dhruva
2009-01-01 13:08       ` dhruva
2009-01-01 13:16       ` Jason Rumney
2009-01-01 13:43         ` dhruva
2009-01-01 19:00           ` Eli Zaretskii
2009-01-02  4:59             ` dhruva
2009-01-02 14:33               ` Eli Zaretskii
2009-01-02 17:44                 ` Chetan Pandya
2009-01-01 18:03       ` Juanma Barranquero
2009-01-01 18:54     ` Eli Zaretskii
2009-01-03  2:27       ` Juanma Barranquero
2009-01-03 12:29         ` Eli Zaretskii
2009-01-03 13:28           ` Juanma Barranquero
2009-01-03 13:53             ` Juanma Barranquero
2009-01-03 15:33               ` Eli Zaretskii [this message]
2009-01-03 16:00                 ` Juanma Barranquero
2009-01-03 16:40                   ` Eli Zaretskii
2009-01-03 16:56                   ` Eli Zaretskii
2009-01-03 17:14                     ` Juanma Barranquero
2009-01-03 19:02                       ` Eli Zaretskii
2009-01-04  2:24                       ` Jason Rumney
2009-01-04  2:30                         ` Juanma Barranquero
2009-01-04  2:33                           ` Jason Rumney
2009-01-04  2:35                             ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uy6xsmmkf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).