This is the mail archive of the
mailing list for the GCC project.
Re: [RFA:] Fix other/14354: low precision on subnormal single FPnumbers multiplied with fp-bit.c
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 03 Mar 2004 17:57:18 -0800
- Subject: Re: [RFA:] Fix other/14354: low precision on subnormal single FPnumbers multiplied with fp-bit.c
- References: <200403010241.i212fZRI003113@ignucius.se.axis.com>
Hans-Peter Nilsson wrote:
* config/fp-bit.c (_fpdiv_parts): Do not round when pack_d would
round the same. When rounding, clear bits that would cause a
second rounding in pack_d.
(_fpmul_parts): Ditto. Remove #if 0:d code.
Did you look at gdb/sim/common/sim-fpu.c? This is a heavily modified
version of fp-bit.c that has many bugs fixed. Generally, when fp-bit.c
is wrong, I look at sim-fpu.c to see what the proper fix is. I think
the best way to improve fp-bit.c is to replace it with sim-fpu.c.
Your patch looks like an improvement over current code since it gets a
little close to sim-fpu.c, but it appears to be slightly different, and
hence I suspect we will still get some edge cases wrong.
The only good way to test fp-bit.c is to generate lots of FP numbers and
perform operations on them, and check to see if the result is correct,
but that is a pain to do.
I will approve this, and very strongly suggest that you look at
sim-fpu.c in gdb's sim/common directory.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com