1 #ifndef _UAPI_METAG_PTRACE_H
2 #define _UAPI_METAG_PTRACE_H
7 * These are the layouts of the regsets returned by the GETREGSET ptrace call
10 /* user_gp_regs::status */
12 /* CBMarker bit (indicates catch state / catch replay) */
13 #define USER_GP_REGS_STATUS_CATCH_BIT (1 << 22)
14 #define USER_GP_REGS_STATUS_CATCH_S 22
15 /* LSM_STEP field (load/store multiple step) */
16 #define USER_GP_REGS_STATUS_LSM_STEP_BITS (0x7 << 8)
17 #define USER_GP_REGS_STATUS_LSM_STEP_S 8
18 /* SCC bit (indicates split 16x16 condition flags) */
19 #define USER_GP_REGS_STATUS_SCC_BIT (1 << 4)
20 #define USER_GP_REGS_STATUS_SCC_S 4
22 /* normal condition flags */
23 /* CF_Z bit (Zero flag) */
24 #define USER_GP_REGS_STATUS_CF_Z_BIT (1 << 3)
25 #define USER_GP_REGS_STATUS_CF_Z_S 3
26 /* CF_N bit (Negative flag) */
27 #define USER_GP_REGS_STATUS_CF_N_BIT (1 << 2)
28 #define USER_GP_REGS_STATUS_CF_N_S 2
29 /* CF_V bit (oVerflow flag) */
30 #define USER_GP_REGS_STATUS_CF_V_BIT (1 << 1)
31 #define USER_GP_REGS_STATUS_CF_V_S 1
32 /* CF_C bit (Carry flag) */
33 #define USER_GP_REGS_STATUS_CF_C_BIT (1 << 0)
34 #define USER_GP_REGS_STATUS_CF_C_S 0
36 /* split 16x16 condition flags */
37 /* SCF_LZ bit (Low Zero flag) */
38 #define USER_GP_REGS_STATUS_SCF_LZ_BIT (1 << 3)
39 #define USER_GP_REGS_STATUS_SCF_LZ_S 3
40 /* SCF_HZ bit (High Zero flag) */
41 #define USER_GP_REGS_STATUS_SCF_HZ_BIT (1 << 2)
42 #define USER_GP_REGS_STATUS_SCF_HZ_S 2
43 /* SCF_HC bit (High Carry flag) */
44 #define USER_GP_REGS_STATUS_SCF_HC_BIT (1 << 1)
45 #define USER_GP_REGS_STATUS_SCF_HC_S 1
46 /* SCF_LC bit (Low Carry flag) */
47 #define USER_GP_REGS_STATUS_SCF_LC_BIT (1 << 0)
48 #define USER_GP_REGS_STATUS_SCF_LC_S 0
51 * struct user_gp_regs - User general purpose registers
52 * @dx: GP data unit regs (dx[reg][unit] = D{unit:0-1}.{reg:0-7})
53 * @ax: GP address unit regs (ax[reg][unit] = A{unit:0-1}.{reg:0-3})
55 * @status: TXSTATUS register (condition flags, LSM_STEP etc)
56 * @rpt: TXRPT registers (branch repeat counter)
57 * @bpobits: TXBPOBITS register ("branch prediction other" bits)
58 * @mode: TXMODE register
59 * @_pad1: Reserved padding to make sizeof obviously 64bit aligned
61 * This is the user-visible general purpose register state structure.
63 * It can be accessed through PTRACE_GETREGSET with NT_PRSTATUS.
65 * It is also used in the signal context.
68 unsigned long dx[8][2];
69 unsigned long ax[4][2];
73 unsigned long bpobits;
79 * struct user_cb_regs - User catch buffer registers
80 * @flags: TXCATCH0 register (fault flags)
81 * @addr: TXCATCH1 register (fault address)
82 * @data: TXCATCH2 and TXCATCH3 registers (low and high data word)
84 * This is the user-visible catch buffer register state structure containing
85 * information about a failed memory access, and allowing the access to be
86 * modified and replayed.
88 * It can be accessed through PTRACE_GETREGSET with NT_METAG_CBUF.
93 unsigned long long data;
97 * struct user_rp_state - User read pipeline state
98 * @entries: Read pipeline entries
99 * @mask: Mask of valid pipeline entries (RPMask from TXDIVTIME register)
101 * This is the user-visible read pipeline state structure containing the entries
102 * currently in the read pipeline and the mask of valid entries.
104 * It can be accessed through PTRACE_GETREGSET with NT_METAG_RPIPE.
106 struct user_rp_state {
107 unsigned long long entries[6];
111 #endif /* __ASSEMBLY__ */
113 #endif /* _UAPI_METAG_PTRACE_H */