This is the mail archive of the gdb@sourceware.cygnus.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]

Re: Proposal for `info float' layout



> Based on the input from the people on the list, I have made a proposal
> for how the output of `info float' should look.  Please take a look at
> it and don't hesitate to mail me your comments.

I like this layout very much!  The following are some minor comments.

> Status Word:         0x0000  IE DE ZE OE UE PE  ES  SF  C0 C1 C2 C3

Perhaps it would be better to reverse the order of Ci bits: C3 C2 C1 C0.  
This is how Intel docs print them, so it might be easier to interpret
them in that way.

> What's printed in the next column depends on the tag.  If
> the register is `Valid', the floating point value is printed using the
> "%g" specifier.

I don't think we can be sure that "%g" will yield enough significant
digits on all supported platforms.  I'd think "%.19Lg" is much
better (LDBL_EPSILON is 1.08e-19 on my machine).  I expect people to
want to see all the significant digits of the 80-bit format stored in
the registers, and the defaults required by ANSI C aren't good enough.

> If the register is `Special', some additional
> interpretation on the contents are done and for infinities and NaN's
> one of the following is printed: `-Inf', `+Inf', `-SNaN', `+SNaN',
> `-QNaN', `+QNaN'.  If the value is a denormal floating point number,
> the value is printed and `Denormal' is printed in the last column.

There is one more possibility: `Unnormal'.  These are the cases where
the mantissa has some of its high bits zeroed, but the (biased)
exponent is NOT zero.  This can happen if some random junk is
interpreted as an FP number.  It is important to single out these
cases because it almost invariably means a bug, while denormals can
happen in correct code.

> It has also been suggested that the mnemonic associated with the
> opcode should be printed.  While I think this is a good idea it is not
> really easy to use libopcodes for this purpose.

What are the difficulties with using libopcodes?

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