Re: [RFA/i387] improve the output of 'info float' (was: "Re: gdb-patch mailing list")

Eli Zaretskii
2010-01-03T10:46:19Z

> Date: Sun, 3 Jan 2010 09:32:13 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> > + /* Precision */
> > + fprintf_filtered (file, "%s ", (status & 0x0020) ? "PE" : " ");
> > + /* Underflow */
> > + fprintf_filtered (file, "%s ", (status & 0x0010) ? "UE" : " ");
> > + /* Overflow */
> > + fprintf_filtered (file, "%s ", (status & 0x0008) ? "OE" : " ");
> > + /* Zero Devide */
> > + fprintf_filtered (file, "%s ", (status & 0x0004) ? "ZE" : " ");
> > + /* Denormalized operand */
> > + fprintf_filtered (file, "%s ", (status & 0x0002) ? "DE" : " ");
> > + /* Invalid operation */
> > + fprintf_filtered (file, "%s ", (status & 0x0001) ? "IE" : " ");
>
> I personally think that the added comments are overkill, but I'm
> otherwise OK with them. Mark might have a different opinion on this.

I'm not Mark, but how exactly are these comments overkill? Unless
someone knows by heart the bits in the x87 FP Status word, or can
decipher the two-letter abbreviations without consulting the Intel
manuals, I'd say they add significantly to the readability of the
source code.

However, these comments need to be formatted according to coding
standards, as in

/* Denormalized operand. */

(i.e. ended with a period and 2 spaces), and also proofread for typos,
like this one:

> > + /* Zero Devide */