Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: patch: init exponent for sim_fpu_class_zero
Date: Mon, 10 Jun 2002 22:15:00 -0000	[thread overview]
Message-ID: <20020611051437.GA22845@redhat.com> (raw)

howdy.

in sim-fpu.c, the exponent is left undefined for zeros (sim_fpu_class_zero).

i am working on a port whose multiply and divide instructions check the 
value of the operands' exponent and sign to determine overflow bits to set.  
this is obviously not working when the exponent is undefined ;-).

i have verified that i can build the sim and gdb after my change (for
powerpc-eabi).

ok to install?

2002-06-09  Aldy Hernandez  <aldyh@redhat.com>

        * sim-fpu.c (unpack_fpu): Initialize exponent for
        sim_fpu_class_zero.
        (i2fpu): Same.
        (sim_fpu_sqrt): Same.

Index: sim-fpu.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-fpu.c,v
retrieving revision 1.3
diff -c -r1.3 sim-fpu.c
*** sim-fpu.c	23 Dec 2000 11:51:04 -0000	1.3
--- sim-fpu.c	11 Jun 2002 05:14:16 -0000
***************
*** 330,335 ****
--- 330,336 ----
  	  /* tastes like zero */
  	  dst->class = sim_fpu_class_zero;
  	  dst->sign = sign;
+ 	  dst->normal_exp = 0;
  	}
        else
  	{
***************
*** 520,525 ****
--- 521,527 ----
      {
        f->class = sim_fpu_class_zero;
        f->sign = 0;
+       f->normal_exp = 0;
      }
    else
      {
***************
*** 648,653 ****
--- 650,656 ----
      {
        f->class = sim_fpu_class_zero;
        f->sign = 0;
+       f->normal_exp = 0;
      }
    else
      {
***************
*** 1799,1804 ****
--- 1802,1808 ----
      {
        f->class = sim_fpu_class_zero;
        f->sign = r->sign;
+       f->normal_exp = 0;
        return 0;
      }
    if (sim_fpu_is_infinity (r))


             reply	other threads:[~2002-06-11  5:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-10 22:15 Aldy Hernandez [this message]
2002-06-11 13:57 ` Andrew Cagney
2002-06-11 17:56   ` Aldy Hernandez

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=20020611051437.GA22845@redhat.com \
    --to=aldyh@redhat.com \
    --cc=gdb-patches@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