1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 20a9426dfSDavid Howells #ifndef _UAPI__ASM_SH_PTRACE_32_H 30a9426dfSDavid Howells #define _UAPI__ASM_SH_PTRACE_32_H 40a9426dfSDavid Howells 50a9426dfSDavid Howells /* 60a9426dfSDavid Howells * GCC defines register number like this: 70a9426dfSDavid Howells * ----------------------------- 80a9426dfSDavid Howells * 0 - 15 are integer registers 90a9426dfSDavid Howells * 17 - 22 are control/special registers 100a9426dfSDavid Howells * 24 - 39 fp registers 110a9426dfSDavid Howells * 40 - 47 xd registers 120a9426dfSDavid Howells * 48 - fpscr register 130a9426dfSDavid Howells * ----------------------------- 140a9426dfSDavid Howells * 150a9426dfSDavid Howells * We follows above, except: 160a9426dfSDavid Howells * 16 --- program counter (PC) 170a9426dfSDavid Howells * 22 --- syscall # 180a9426dfSDavid Howells * 23 --- floating point communication register 190a9426dfSDavid Howells */ 200a9426dfSDavid Howells #define REG_REG0 0 210a9426dfSDavid Howells #define REG_REG15 15 220a9426dfSDavid Howells 230a9426dfSDavid Howells #define REG_PC 16 240a9426dfSDavid Howells 250a9426dfSDavid Howells #define REG_PR 17 260a9426dfSDavid Howells #define REG_SR 18 270a9426dfSDavid Howells #define REG_GBR 19 280a9426dfSDavid Howells #define REG_MACH 20 290a9426dfSDavid Howells #define REG_MACL 21 300a9426dfSDavid Howells 310a9426dfSDavid Howells #define REG_SYSCALL 22 320a9426dfSDavid Howells 330a9426dfSDavid Howells #define REG_FPREG0 23 340a9426dfSDavid Howells #define REG_FPREG15 38 350a9426dfSDavid Howells #define REG_XFREG0 39 360a9426dfSDavid Howells #define REG_XFREG15 54 370a9426dfSDavid Howells 380a9426dfSDavid Howells #define REG_FPSCR 55 390a9426dfSDavid Howells #define REG_FPUL 56 400a9426dfSDavid Howells 410a9426dfSDavid Howells /* 420a9426dfSDavid Howells * This struct defines the way the registers are stored on the 430a9426dfSDavid Howells * kernel stack during a system call or other kernel entry. 440a9426dfSDavid Howells */ 450a9426dfSDavid Howells struct pt_regs { 460a9426dfSDavid Howells unsigned long regs[16]; 470a9426dfSDavid Howells unsigned long pc; 480a9426dfSDavid Howells unsigned long pr; 490a9426dfSDavid Howells unsigned long sr; 500a9426dfSDavid Howells unsigned long gbr; 510a9426dfSDavid Howells unsigned long mach; 520a9426dfSDavid Howells unsigned long macl; 530a9426dfSDavid Howells long tra; 540a9426dfSDavid Howells }; 550a9426dfSDavid Howells 560a9426dfSDavid Howells /* 570a9426dfSDavid Howells * This struct defines the way the DSP registers are stored on the 580a9426dfSDavid Howells * kernel stack during a system call or other kernel entry. 590a9426dfSDavid Howells */ 600a9426dfSDavid Howells struct pt_dspregs { 610a9426dfSDavid Howells unsigned long a1; 620a9426dfSDavid Howells unsigned long a0g; 630a9426dfSDavid Howells unsigned long a1g; 640a9426dfSDavid Howells unsigned long m0; 650a9426dfSDavid Howells unsigned long m1; 660a9426dfSDavid Howells unsigned long a0; 670a9426dfSDavid Howells unsigned long x0; 680a9426dfSDavid Howells unsigned long x1; 690a9426dfSDavid Howells unsigned long y0; 700a9426dfSDavid Howells unsigned long y1; 710a9426dfSDavid Howells unsigned long dsr; 720a9426dfSDavid Howells unsigned long rs; 730a9426dfSDavid Howells unsigned long re; 740a9426dfSDavid Howells unsigned long mod; 750a9426dfSDavid Howells }; 760a9426dfSDavid Howells 770a9426dfSDavid Howells 780a9426dfSDavid Howells #endif /* _UAPI__ASM_SH_PTRACE_32_H */ 79