1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI__ASM_SH_PTRACE_32_H
3#define _UAPI__ASM_SH_PTRACE_32_H
4
5/*
6 * GCC defines register number like this:
7 * -----------------------------
8 *	 0 - 15 are integer registers
9 *	17 - 22 are control/special registers
10 *	24 - 39 fp registers
11 *	40 - 47 xd registers
12 *	48 -    fpscr register
13 * -----------------------------
14 *
15 * We follows above, except:
16 *	16 --- program counter (PC)
17 *	22 --- syscall #
18 *	23 --- floating point communication register
19 */
20#define REG_REG0	 0
21#define REG_REG15	15
22
23#define REG_PC		16
24
25#define REG_PR		17
26#define REG_SR		18
27#define REG_GBR		19
28#define REG_MACH	20
29#define REG_MACL	21
30
31#define REG_SYSCALL	22
32
33#define REG_FPREG0	23
34#define REG_FPREG15	38
35#define REG_XFREG0	39
36#define REG_XFREG15	54
37
38#define REG_FPSCR	55
39#define REG_FPUL	56
40
41/*
42 * This struct defines the way the registers are stored on the
43 * kernel stack during a system call or other kernel entry.
44 */
45struct pt_regs {
46	unsigned long regs[16];
47	unsigned long pc;
48	unsigned long pr;
49	unsigned long sr;
50	unsigned long gbr;
51	unsigned long mach;
52	unsigned long macl;
53	long tra;
54};
55
56/*
57 * This struct defines the way the DSP registers are stored on the
58 * kernel stack during a system call or other kernel entry.
59 */
60struct pt_dspregs {
61	unsigned long	a1;
62	unsigned long	a0g;
63	unsigned long	a1g;
64	unsigned long	m0;
65	unsigned long	m1;
66	unsigned long	a0;
67	unsigned long	x0;
68	unsigned long	x1;
69	unsigned long	y0;
70	unsigned long	y1;
71	unsigned long	dsr;
72	unsigned long	rs;
73	unsigned long	re;
74	unsigned long	mod;
75};
76
77
78#endif /* _UAPI__ASM_SH_PTRACE_32_H */
79