uctx.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * uctx.h: Sparc64 {set,get}context() register state layouts.
  4. *
  5. * Copyright (C) 1997 David S. Miller ([email protected])
  6. */
  7. #ifndef __SPARC64_UCTX_H
  8. #define __SPARC64_UCTX_H
  9. #define MC_TSTATE 0
  10. #define MC_PC 1
  11. #define MC_NPC 2
  12. #define MC_Y 3
  13. #define MC_G1 4
  14. #define MC_G2 5
  15. #define MC_G3 6
  16. #define MC_G4 7
  17. #define MC_G5 8
  18. #define MC_G6 9
  19. #define MC_G7 10
  20. #define MC_O0 11
  21. #define MC_O1 12
  22. #define MC_O2 13
  23. #define MC_O3 14
  24. #define MC_O4 15
  25. #define MC_O5 16
  26. #define MC_O6 17
  27. #define MC_O7 18
  28. #define MC_NGREG 19
  29. typedef unsigned long mc_greg_t;
  30. typedef mc_greg_t mc_gregset_t[MC_NGREG];
  31. #define MC_MAXFPQ 16
  32. struct mc_fq {
  33. unsigned long *mcfq_addr;
  34. unsigned int mcfq_insn;
  35. };
  36. struct mc_fpu {
  37. union {
  38. unsigned int sregs[32];
  39. unsigned long dregs[32];
  40. long double qregs[16];
  41. } mcfpu_fregs;
  42. unsigned long mcfpu_fsr;
  43. unsigned long mcfpu_fprs;
  44. unsigned long mcfpu_gsr;
  45. struct mc_fq *mcfpu_fq;
  46. unsigned char mcfpu_qcnt;
  47. unsigned char mcfpu_qentsz;
  48. unsigned char mcfpu_enab;
  49. };
  50. typedef struct mc_fpu mc_fpu_t;
  51. typedef struct {
  52. mc_gregset_t mc_gregs;
  53. mc_greg_t mc_fp;
  54. mc_greg_t mc_i7;
  55. mc_fpu_t mc_fpregs;
  56. } mcontext_t;
  57. struct ucontext {
  58. struct ucontext *uc_link;
  59. unsigned long uc_flags;
  60. sigset_t uc_sigmask;
  61. mcontext_t uc_mcontext;
  62. };
  63. typedef struct ucontext ucontext_t;
  64. #endif /* __SPARC64_UCTX_H */