Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / sh / include / asm / ptrace_32.h
blob6c2239cca1a2d86204a52ecef53ab5514f8a6073
1 #ifndef __ASM_SH_PTRACE_32_H
2 #define __ASM_SH_PTRACE_32_H
4 /*
5 * GCC defines register number like this:
6 * -----------------------------
7 * 0 - 15 are integer registers
8 * 17 - 22 are control/special registers
9 * 24 - 39 fp registers
10 * 40 - 47 xd registers
11 * 48 - fpscr register
12 * -----------------------------
14 * We follows above, except:
15 * 16 --- program counter (PC)
16 * 22 --- syscall #
17 * 23 --- floating point communication register
19 #define REG_REG0 0
20 #define REG_REG15 15
22 #define REG_PC 16
24 #define REG_PR 17
25 #define REG_SR 18
26 #define REG_GBR 19
27 #define REG_MACH 20
28 #define REG_MACL 21
30 #define REG_SYSCALL 22
32 #define REG_FPREG0 23
33 #define REG_FPREG15 38
34 #define REG_XFREG0 39
35 #define REG_XFREG15 54
37 #define REG_FPSCR 55
38 #define REG_FPUL 56
41 * This struct defines the way the registers are stored on the
42 * kernel stack during a system call or other kernel entry.
44 struct pt_regs {
45 unsigned long regs[16];
46 unsigned long pc;
47 unsigned long pr;
48 unsigned long sr;
49 unsigned long gbr;
50 unsigned long mach;
51 unsigned long macl;
52 long tra;
56 * This struct defines the way the DSP registers are stored on the
57 * kernel stack during a system call or other kernel entry.
59 struct pt_dspregs {
60 unsigned long a1;
61 unsigned long a0g;
62 unsigned long a1g;
63 unsigned long m0;
64 unsigned long m1;
65 unsigned long a0;
66 unsigned long x0;
67 unsigned long x1;
68 unsigned long y0;
69 unsigned long y1;
70 unsigned long dsr;
71 unsigned long rs;
72 unsigned long re;
73 unsigned long mod;
76 #ifdef __KERNEL__
78 #define MAX_REG_OFFSET offsetof(struct pt_regs, tra)
79 #define regs_return_value(_regs) ((_regs)->regs[0])
81 #endif /* __KERNEL__ */
83 #endif /* __ASM_SH_PTRACE_32_H */