sigcontext.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef _ASM_X86_SIGCONTEXT_H
  2. #define _ASM_X86_SIGCONTEXT_H
  3. #include <uapi/asm/sigcontext.h>
  4. #ifdef __i386__
  5. struct sigcontext {
  6. unsigned short gs, __gsh;
  7. unsigned short fs, __fsh;
  8. unsigned short es, __esh;
  9. unsigned short ds, __dsh;
  10. unsigned long di;
  11. unsigned long si;
  12. unsigned long bp;
  13. unsigned long sp;
  14. unsigned long bx;
  15. unsigned long dx;
  16. unsigned long cx;
  17. unsigned long ax;
  18. unsigned long trapno;
  19. unsigned long err;
  20. unsigned long ip;
  21. unsigned short cs, __csh;
  22. unsigned long flags;
  23. unsigned long sp_at_signal;
  24. unsigned short ss, __ssh;
  25. /*
  26. * fpstate is really (struct _fpstate *) or (struct _xstate *)
  27. * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
  28. * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
  29. * of extended memory layout. See comments at the definition of
  30. * (struct _fpx_sw_bytes)
  31. */
  32. void __user *fpstate; /* zero when no FPU/extended context */
  33. unsigned long oldmask;
  34. unsigned long cr2;
  35. };
  36. #else /* __i386__ */
  37. struct sigcontext {
  38. unsigned long r8;
  39. unsigned long r9;
  40. unsigned long r10;
  41. unsigned long r11;
  42. unsigned long r12;
  43. unsigned long r13;
  44. unsigned long r14;
  45. unsigned long r15;
  46. unsigned long di;
  47. unsigned long si;
  48. unsigned long bp;
  49. unsigned long bx;
  50. unsigned long dx;
  51. unsigned long ax;
  52. unsigned long cx;
  53. unsigned long sp;
  54. unsigned long ip;
  55. unsigned long flags;
  56. unsigned short cs;
  57. unsigned short gs;
  58. unsigned short fs;
  59. unsigned short __pad0;
  60. unsigned long err;
  61. unsigned long trapno;
  62. unsigned long oldmask;
  63. unsigned long cr2;
  64. /*
  65. * fpstate is really (struct _fpstate *) or (struct _xstate *)
  66. * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
  67. * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
  68. * of extended memory layout. See comments at the definition of
  69. * (struct _fpx_sw_bytes)
  70. */
  71. void __user *fpstate; /* zero when no FPU/extended context */
  72. unsigned long reserved1[8];
  73. };
  74. #endif /* !__i386__ */
  75. #endif /* _ASM_X86_SIGCONTEXT_H */