public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Ben Elliston <bje@redhat.com>
Cc: CGEN <cgen@sources.redhat.com>, gdb@sources.redhat.com
Subject: Re: Tracing for floating point values
Date: Thu, 14 Dec 2000 17:04:00 -0000	[thread overview]
Message-ID: <3A396BB0.7CF48446@cygnus.com> (raw)
In-Reply-To: <Pine.LNX.4.31.0012090940090.22164-100000@moshpit.cygnus.com>

Ben Elliston wrote:
> 
> Currently, the TRACE_RESULTS web of macros/functions in
> sim/common/cgen-trace.c don't know how to handle the 'f' printf-type for SF
> and DF operands.  Only 'D' and 'x' are handled at present.
> 
> I set about fixing this yesterday.  There were two approaches I considered:
> 
>         * use the host's native printf %x.  Comments in sim-fpu.[hc]
>           indicate this is a bad mistake.  There's no guarantee that the
>           host will use the same floating point representation as the
>           target.

You would need to be very careful about SNaNs.

>         * use sim_fpu's sim_fpu_print_fpu to output the real number
>           using cgen_trace_printf as its callback (which works nicely).
>           However, we get very detailed output!
> 
>         fr <- +1.0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000*2^+0
> 
> Which way seems right to jump?

What about a print function that outputs things in decimal - something
like ``%f'' or ``%g''.  While the existing print function is really
useful for someone debugging the internals it isn't much use to normal
users.

	Andrew

      reply	other threads:[~2000-12-14 17:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08 14:57 Ben Elliston
2000-12-14 17:04 ` Andrew Cagney [this message]

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

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

  git send-email \
    --in-reply-to=3A396BB0.7CF48446@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=bje@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=gdb@sources.redhat.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.
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).