ptrace.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2. /*
  3. * Copyright (C) 2012 Regents of the University of California
  4. */
  5. #ifndef _UAPI_ASM_RISCV_PTRACE_H
  6. #define _UAPI_ASM_RISCV_PTRACE_H
  7. #ifndef __ASSEMBLY__
  8. #include <linux/types.h>
  9. /*
  10. * User-mode register state for core dumps, ptrace, sigcontext
  11. *
  12. * This decouples struct pt_regs from the userspace ABI.
  13. * struct user_regs_struct must form a prefix of struct pt_regs.
  14. */
  15. struct user_regs_struct {
  16. unsigned long pc;
  17. unsigned long ra;
  18. unsigned long sp;
  19. unsigned long gp;
  20. unsigned long tp;
  21. unsigned long t0;
  22. unsigned long t1;
  23. unsigned long t2;
  24. unsigned long s0;
  25. unsigned long s1;
  26. unsigned long a0;
  27. unsigned long a1;
  28. unsigned long a2;
  29. unsigned long a3;
  30. unsigned long a4;
  31. unsigned long a5;
  32. unsigned long a6;
  33. unsigned long a7;
  34. unsigned long s2;
  35. unsigned long s3;
  36. unsigned long s4;
  37. unsigned long s5;
  38. unsigned long s6;
  39. unsigned long s7;
  40. unsigned long s8;
  41. unsigned long s9;
  42. unsigned long s10;
  43. unsigned long s11;
  44. unsigned long t3;
  45. unsigned long t4;
  46. unsigned long t5;
  47. unsigned long t6;
  48. };
  49. struct __riscv_f_ext_state {
  50. __u32 f[32];
  51. __u32 fcsr;
  52. };
  53. struct __riscv_d_ext_state {
  54. __u64 f[32];
  55. __u32 fcsr;
  56. };
  57. struct __riscv_q_ext_state {
  58. __u64 f[64] __attribute__((aligned(16)));
  59. __u32 fcsr;
  60. /*
  61. * Reserved for expansion of sigcontext structure. Currently zeroed
  62. * upon signal, and must be zero upon sigreturn.
  63. */
  64. __u32 reserved[3];
  65. };
  66. union __riscv_fp_state {
  67. struct __riscv_f_ext_state f;
  68. struct __riscv_d_ext_state d;
  69. struct __riscv_q_ext_state q;
  70. };
  71. #endif /* __ASSEMBLY__ */
  72. #endif /* _UAPI_ASM_RISCV_PTRACE_H */