This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: patch to convert_doublest_to_floatformat in doublest.c




Kevin Buettner wrote:
On Jun 10, 3:16pm, J. Johnston wrote:


The old algorithm is correct for floating values whereby there are
32 or more mantissa bits.  In such a case, we only can put 31 bits
into the result.  A simple test was added.  The patch has been
tested on the ia64 and x86.


I'm wondering about the test that you added.  You say that the old
algorithm was correct for 32 or *more* mantissa bits.  Yet the test
you added is as follows:


+ if (mant_bits == 32)


I'm wondering if this should instead be:

if (mant_bits >= 32)

?

Kevin


No, it is ok. The algorithm only processes 32 bits at a time. If you look earlier, you will see:

mant_bits = mant_bits_left < 32 ? mant_bits_left : 32;

-- Jeff J.


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