asm-ppc64/ptrace.h / fscpr

Marcus Meissner meissner at suse.de
Thu May 20 01:44:26 EST 2004


Hi,

The fpscr offset is wrong, it is at position 32 in the FPR array on ppc64.

Found by IBM gdb testing.

I have the vague suspicion the ptrace32 compat handling might be broken too,
but I have to check.

Ciao, Marcus
-------------- next part --------------
--- include/asm-ppc64/ptrace.h	2004-05-18 16:04:44.352972880 -0700
+++ include/asm-ppc64/ptrace.h	2004-05-18 17:05:58.773957528 -0700
@@ -123,8 +123,10 @@

 /* Kernel and userspace will both use this PT_FPSCR value.  32-bit apps will have
  * visibility to the asm-ppc/ptrace.h header instead of this one.
+ *
+ * There are 32 FP regs, and 1 control register
  */
-#define PT_FPSCR (PT_FPR0 + 32 + 1)	  /* each FP reg occupies 1 slot in 64-bit space */
+#define PT_FPSCR (PT_FPR0 + 32)	  /* each FP reg occupies 1 slot in 64-bit space */

 #ifdef __KERNEL__
 #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1)	  /* each FP reg occupies 2 32-bit userspace slots */


More information about the Linuxppc64-dev mailing list