1
2#ifndef _CRIS_ARCH_PTRACE_H
3#define _CRIS_ARCH_PTRACE_H
4
5
6
7#define PT_ORIG_R10 0
8#define PT_R0 1
9#define PT_R1 2
10#define PT_R2 3
11#define PT_R3 4
12#define PT_R4 5
13#define PT_R5 6
14#define PT_R6 7
15#define PT_R7 8
16#define PT_R8 9
17#define PT_R9 10
18#define PT_R10 11
19#define PT_R11 12
20#define PT_R12 13
21#define PT_R13 14
22#define PT_ACR 15
23#define PT_SRS 16
24#define PT_MOF 17
25#define PT_SPC 18
26#define PT_CCS 19
27#define PT_SRP 20
28#define PT_ERP 21
29#define PT_EXS 22
30#define PT_EDA 23
31#define PT_USP 24
32#define PT_PPC 25
33#define PT_BP 26
34#define PT_BP_CTRL 26
35#define PT_MAX 40
36
37
38#define C_CCS_BITNR 0
39#define V_CCS_BITNR 1
40#define Z_CCS_BITNR 2
41#define N_CCS_BITNR 3
42#define X_CCS_BITNR 4
43#define I_CCS_BITNR 5
44#define U_CCS_BITNR 6
45#define P_CCS_BITNR 7
46#define R_CCS_BITNR 8
47#define S_CCS_BITNR 9
48#define M_CCS_BITNR 30
49#define Q_CCS_BITNR 31
50#define CCS_SHIFT 10
51
52
53
54
55
56
57struct pt_regs {
58 unsigned long orig_r10;
59
60 unsigned long r0;
61 unsigned long r1;
62 unsigned long r2;
63 unsigned long r3;
64 unsigned long r4;
65 unsigned long r5;
66 unsigned long r6;
67 unsigned long r7;
68 unsigned long r8;
69 unsigned long r9;
70 unsigned long r10;
71 unsigned long r11;
72 unsigned long r12;
73 unsigned long r13;
74 unsigned long acr;
75 unsigned long srs;
76 unsigned long mof;
77 unsigned long spc;
78 unsigned long ccs;
79 unsigned long srp;
80 unsigned long erp;
81
82 unsigned long exs;
83 unsigned long eda;
84};
85
86
87
88
89
90
91
92
93
94
95
96struct switch_stack {
97 unsigned long r0;
98 unsigned long r1;
99 unsigned long r2;
100 unsigned long r3;
101 unsigned long r4;
102 unsigned long r5;
103 unsigned long r6;
104 unsigned long r7;
105 unsigned long r8;
106 unsigned long r9;
107 unsigned long return_ip;
108};
109
110#ifdef __KERNEL__
111
112#define arch_has_single_step() (1)
113#define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0)
114#define instruction_pointer(regs) ((regs)->erp)
115#define profile_pc(regs) instruction_pointer(regs)
116
117#endif
118
119#endif
120