ptrace_32.h 1.6 KB

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