This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
patch: init exponent for sim_fpu_class_zero
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 11 Jun 2002 15:14:37 +1000
- Subject: patch: init exponent for sim_fpu_class_zero
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))