18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _UAPI__ASM_SH_PTRACE_32_H
38c2ecf20Sopenharmony_ci#define _UAPI__ASM_SH_PTRACE_32_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * GCC defines register number like this:
78c2ecf20Sopenharmony_ci * -----------------------------
88c2ecf20Sopenharmony_ci *	 0 - 15 are integer registers
98c2ecf20Sopenharmony_ci *	17 - 22 are control/special registers
108c2ecf20Sopenharmony_ci *	24 - 39 fp registers
118c2ecf20Sopenharmony_ci *	40 - 47 xd registers
128c2ecf20Sopenharmony_ci *	48 -    fpscr register
138c2ecf20Sopenharmony_ci * -----------------------------
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * We follows above, except:
168c2ecf20Sopenharmony_ci *	16 --- program counter (PC)
178c2ecf20Sopenharmony_ci *	22 --- syscall #
188c2ecf20Sopenharmony_ci *	23 --- floating point communication register
198c2ecf20Sopenharmony_ci */
208c2ecf20Sopenharmony_ci#define REG_REG0	 0
218c2ecf20Sopenharmony_ci#define REG_REG15	15
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#define REG_PC		16
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#define REG_PR		17
268c2ecf20Sopenharmony_ci#define REG_SR		18
278c2ecf20Sopenharmony_ci#define REG_GBR		19
288c2ecf20Sopenharmony_ci#define REG_MACH	20
298c2ecf20Sopenharmony_ci#define REG_MACL	21
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define REG_SYSCALL	22
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define REG_FPREG0	23
348c2ecf20Sopenharmony_ci#define REG_FPREG15	38
358c2ecf20Sopenharmony_ci#define REG_XFREG0	39
368c2ecf20Sopenharmony_ci#define REG_XFREG15	54
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#define REG_FPSCR	55
398c2ecf20Sopenharmony_ci#define REG_FPUL	56
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci/*
428c2ecf20Sopenharmony_ci * This struct defines the way the registers are stored on the
438c2ecf20Sopenharmony_ci * kernel stack during a system call or other kernel entry.
448c2ecf20Sopenharmony_ci */
458c2ecf20Sopenharmony_cistruct pt_regs {
468c2ecf20Sopenharmony_ci	unsigned long regs[16];
478c2ecf20Sopenharmony_ci	unsigned long pc;
488c2ecf20Sopenharmony_ci	unsigned long pr;
498c2ecf20Sopenharmony_ci	unsigned long sr;
508c2ecf20Sopenharmony_ci	unsigned long gbr;
518c2ecf20Sopenharmony_ci	unsigned long mach;
528c2ecf20Sopenharmony_ci	unsigned long macl;
538c2ecf20Sopenharmony_ci	long tra;
548c2ecf20Sopenharmony_ci};
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci/*
578c2ecf20Sopenharmony_ci * This struct defines the way the DSP registers are stored on the
588c2ecf20Sopenharmony_ci * kernel stack during a system call or other kernel entry.
598c2ecf20Sopenharmony_ci */
608c2ecf20Sopenharmony_cistruct pt_dspregs {
618c2ecf20Sopenharmony_ci	unsigned long	a1;
628c2ecf20Sopenharmony_ci	unsigned long	a0g;
638c2ecf20Sopenharmony_ci	unsigned long	a1g;
648c2ecf20Sopenharmony_ci	unsigned long	m0;
658c2ecf20Sopenharmony_ci	unsigned long	m1;
668c2ecf20Sopenharmony_ci	unsigned long	a0;
678c2ecf20Sopenharmony_ci	unsigned long	x0;
688c2ecf20Sopenharmony_ci	unsigned long	x1;
698c2ecf20Sopenharmony_ci	unsigned long	y0;
708c2ecf20Sopenharmony_ci	unsigned long	y1;
718c2ecf20Sopenharmony_ci	unsigned long	dsr;
728c2ecf20Sopenharmony_ci	unsigned long	rs;
738c2ecf20Sopenharmony_ci	unsigned long	re;
748c2ecf20Sopenharmony_ci	unsigned long	mod;
758c2ecf20Sopenharmony_ci};
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#endif /* _UAPI__ASM_SH_PTRACE_32_H */
79