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

* Re: patch: init exponent for sim_fpu_class_zero
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-06-11 13:57 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: 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?

Hmm, wierd,

> + 	  dst->normal_exp = 0;

of the possible values that is the most intuitive so yes.

Can you, separatly, commit/post a patch adding your self to the 
gdb/MAINTAINERS file under write after approva.

Andrew



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

* Re: patch: init exponent for sim_fpu_class_zero
  2002-06-11 13:57 ` Andrew Cagney
@ 2002-06-11 17:56   ` Aldy Hernandez
  0 siblings, 0 replies; 3+ messages in thread
From: Aldy Hernandez @ 2002-06-11 17:56 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches


> Hmm, wierd,
> 
> >+ 	  dst->normal_exp = 0;
> 
> of the possible values that is the most intuitive so yes.

committed.

> Can you, separatly, commit/post a patch adding your self to the 
> gdb/MAINTAINERS file under write after approva.

committed the following as well.

thanks.

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

        * MAINTAINERS: Add self.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.180
diff -c -p -r1.180 MAINTAINERS
*** MAINTAINERS	2 Jun 2002 03:09:31 -0000	1.180
--- MAINTAINERS	12 Jun 2002 00:54:15 -0000
*************** Fred Fish					fnf@ninemoons.com
*** 391,396 ****
--- 391,397 ----
  Orjan Friberg					orjanf@axis.com
  Ben Harris					bjh21@netbsd.org
  Richard Henderson				rth@redhat.com
+ Aldy Hernandez					aldyh@redhat.com
  Paul Hilfinger					hilfinger@gnat.com
  Matt Hiller					hiller@redhat.com
  Kazu Hirata					kazu@hxi.com


^ 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