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]

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.

Here is how I think the output of `info float' (for a ficticious FPU
state) should look like:

------------------------------------------------------------------

  R7: Valid   0x00000000000000000000 1.0000000000000000000
=>R6: Special 0x00000000000000000000 +QNaN
  R5: Empty   0x00000000000000000000
  R4: Zero    0x00000000000000000000 -0
  R3: Special 0x00000000000000000000 0.0024438394034300000 Denormal
  R2: Empty   0x00000000000000000000 
  R1: Empty   0x00000000000000000000
  R0: Empty   0x00000000000000000000

Status Word:         0x0000  IE DE ZE OE UE PE  ES  SF  C0 C1 C2 C3
                       TOP: 6
Control Word:        0x0000  IM DM ZM OM UM PM
                       PC: Extended Precision (64-bits)
                       RC: Round to nearest
Tag Word:            0x0000
Instruction Pointer: 0x00:0x00000000
Operand Pointer:     0x00:0x00000000
Opcode:              0x0000

-------------------------------------------------------------------

The registers are printed in "physical" order, with the same names as
in the Intel documentation.  After the register name the
interpretation of the bits relevant for this register in the tag word
is printed, again using the terminology used by the Intel
documentation.  Then the register contents are printed, in hexadecimal
notation.  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.  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.  If
the value is `Zero', `-0' or `+0' is printed.  The top of the stack is
indicated by `=>' in the first columns.

After the registers, the status word is printed.  All flags that are
set are printed in the notation that Intel uses.  They are always
printed in the same location.  On a seperate line the contents of the
top of stack register (TOP) are printed.

Next is the control word.  The flags are printed, such that the mask
flags are printed exactly below the corresponding flags in the status
word.  The contents of the precision control register (PC) and
rounding control register (RC) are printed on a seperate line.

The tag word follows.  Only the raw contents are printed.

After the tag word follow the instruction and operand pointers, in
segment:offset notation.

The last thing that is printed is the opcode, including the bits that
are stripped because they're always the same.


There has been a suggestion that `info float' should interpret the C0,
C1, C2 and C3 flags of the status word.  I don't think that this is
feasable since it is pretty complicated.

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.  So my first
implementation will not contain this feature.

Mark

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