patch-2.3.99-pre6 linux/include/asm-sh/ptrace.h

Next file: linux/include/asm-sh/sigcontext.h
Previous file: linux/include/asm-sh/hardirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/include/asm-sh/ptrace.h linux/include/asm-sh/ptrace.h
@@ -7,19 +7,23 @@
  */
 
 /*
- * As GCC does:
- *  0 - 15 are integer registers
- * 17 - 22 are control/special registers
- * 24 - 39 fp registers
- * 40 - 47 xd registers
- * 48 -    fpscr register
+ * GCC defines register number like this:
  * -----------------------------
- * Not as GCC:
- * 16 --- program counter PC
- * 23 --- syscall #
+ *	 0 - 15 are integer registers
+ *	17 - 22 are control/special registers
+ *	24 - 39 fp registers
+ *	40 - 47 xd registers
+ *	48 -    fpscr register
+ * -----------------------------
+ *
+ * We follows above, except:
+ *	16 --- program counter (PC)
+ *	22 --- syscall #
+ *	23 --- floating point communication register
  */
 #define REG_REG0	 0
 #define REG_REG15	15
+
 #define REG_PC		16
 
 #define REG_PR		17
@@ -27,9 +31,10 @@
 #define REG_GBR      	19
 #define REG_MACH	20
 #define REG_MACL	21
-#define REG_FPUL	22
 
-#define REG_SYSCALL	23
+#define REG_SYSCALL	22
+
+#define REG_FPUL	23
 
 #define REG_FPREG0	24
 #define REG_FPREG15	39
@@ -42,14 +47,14 @@
  * kernel stack during a system call or other kernel entry.
  */
 struct pt_regs {
-	long syscall_nr;
-	unsigned long sr;
 	unsigned long regs[16];
+	unsigned long pc;
+	unsigned long pr;
+	unsigned long sr;
 	unsigned long gbr;
 	unsigned long mach;
 	unsigned long macl;
-	unsigned long pr;
-	unsigned long pc;
+	long syscall_nr;
 };
 
 #ifdef __KERNEL__
@@ -60,18 +65,17 @@
 /* User Break Controller */
 
 #if defined(__sh3__)
-/* The value is for sh4, please fix... */
-#define UBC_BARA		0xff200000
-#define UBC_BAMRA		0xff200004
-#define UBC_BBRA		0xff200008
-#define UBC_BASRA		0xff000014
-#define UBC_BARB		0xff20000c
-#define UBC_BAMRB		0xff200010
-#define UBC_BBRB		0xff200014
-#define UBC_BASRB		0xff000018
-#define UBC_BDRB		0xff200018
-#define UBC_BDMRB		0xff20001c
-#define UBC_BRCR		0xff200020
+#define UBC_BARA                0xffffffb0
+#define UBC_BAMRA               0xffffffb4
+#define UBC_BBRA                0xffffffb8
+#define UBC_BASRA               0xffffffe4
+#define UBC_BARB                0xffffffa0
+#define UBC_BAMRB               0xffffffa4
+#define UBC_BBRB                0xffffffa8
+#define UBC_BASRB               0xffffffe8
+#define UBC_BDRB                0xffffff90
+#define UBC_BDMRB               0xffffff94
+#define UBC_BRCR                0xffffff98
 #elif defined(__SH4__)
 #define UBC_BARA		0xff200000
 #define UBC_BAMRA		0xff200004

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)