Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [ppc64-linux]: Compute u-area offsets of FP registers correctly
@ 2003-06-07  0:01 Jim Blandy
  2003-06-11  0:12 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2003-06-07  0:01 UTC (permalink / raw)
  To: gdb-patches


2003-06-06  Jim Blandy  <jimb@redhat.com>

	* ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
	offsets for floating-point registers in both 32- and 64-bit
	interfaces.

Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.21.6.3
retrieving revision 1.21.6.4
diff -c -c -F'^(' -r1.21.6.3 -r1.21.6.4
*** gdb/ppc-linux-nat.c	28 May 2003 20:20:21 -0000	1.21.6.3
--- gdb/ppc-linux-nat.c	6 Jun 2003 06:59:02 -0000	1.21.6.4
***************
*** 133,141 ****
    if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
      u_addr =  ((PT_R0 + regno) * wordsize);
  
!   /* Floating point regs: 2 slots each */
    if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
!     u_addr = ((PT_FPR0 + (regno - FP0_REGNUM) * 2) * 4);
  
    /* UISA special purpose registers: 1 slot each */
    if (regno == PC_REGNUM)
--- 133,143 ----
    if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
      u_addr =  ((PT_R0 + regno) * wordsize);
  
!   /* Floating point regs: eight bytes in both 32- and 64-bit ptrace
!      interfaces.  Thus, two slots each in 32-bit interface, one slot
!      each in 64-bit interface.  */
    if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
!     u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8);
  
    /* UISA special purpose registers: 1 slot each */
    if (regno == PC_REGNUM)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-11  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-07  0:01 [ppc64-linux]: Compute u-area offsets of FP registers correctly Jim Blandy
2003-06-11  0:12 ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox