This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Fix other/14354: low precision on subnormal single FPnumbers multiplied with fp-bit.c


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]