[RFA:] Fix other/14354: low precision on subnormal single FP numbers multiplied with fp-bit.c
Jim Wilson
wilson@specifixinc.com
Thu Mar 4 01:57:00 GMT 2004
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
More information about the Gcc-patches
mailing list