Printing decimal128 types out of registers

Thiago Jung Bauermann bauerman@br.ibm.com
Wed Jan 30 15:46:00 GMT 2008


On Wed, 2008-01-23 at 10:20 -0500, Daniel Jacobowitz wrote:
> On Wed, Jan 23, 2008 at 01:10:38PM -0200, Thiago Jung Bauermann wrote:
> > > So I suggest we not have $dl0 except on
> > > hardware where the GDB user might look at the next instruction, see
> > > that it operates on register dl0, and want to check the value of that
> > > register.

<snip>

> If this is too complicated, I wouldn't argue against a patch that just
> added them if the floating point regsiters are present.  Seems like it
> won't be useful on a lot of processors though.

Actually, this option is more appropriate. I have recently learned that
there are some regular float instructions which can be directly used in
DFP values stored in FP registers, like fabs, fneg and the other
floating point move instructions. So it is very useful to have the
pseudo-registers around even without specific DFP hardware.

The attached patch is a rework of Luis' patch, with the following
modifications:

- don't use tdesc XML machinery to define the DFP pseudo-regs;
- fixed logic in rs6000_pseudo_register_reggroup_p as noted by Daniel;
- put DFP pseudo-regs in float register group;
- the DFP pseudo-regs don't show up if there's no FPU;
- reorganized the pseudo_register_{read,write} functions: there's now
  a generic one which concentrates the gdb_asserts and checking, and
  calls either the SPE or DFP as appropriate.
- documentation: mention the DFP pseudo-regs in the Decimal Floating 
  Point subsection, and created a PowerPC architecture subsection to
  talk about them in more detail. I had to rename the PowerPC Embedded 
  section to avoid a node name conflict.

This patch is on top of the SPE macro cleanup patch which I just posted:

http://sourceware.org/ml/gdb-patches/2008-01/msg00794.html

Is this ok?
-- 
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dec128-regs.diff
Type: text/x-patch
Size: 19437 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080130/af8ee200/attachment.bin>


More information about the Gdb-patches mailing list