Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* patch: init exponent for sim_fpu_class_zero
@ 2002-06-10 22:15 Aldy Hernandez
  2002-06-11 13:57 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Aldy Hernandez @ 2002-06-10 22:15 UTC (permalink / raw)
  To: gdb-patches

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))


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-06-12  0:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-10 22:15 patch: init exponent for sim_fpu_class_zero Aldy Hernandez
2002-06-11 13:57 ` Andrew Cagney
2002-06-11 17:56   ` Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox