sigcontext_32.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _ASMi386_SIGCONTEXT_H
  2. #define _ASMi386_SIGCONTEXT_H
  3. #include <linux/compiler.h>
  4. /*
  5. * As documented in the iBCS2 standard..
  6. *
  7. * The first part of "struct _fpstate" is just the normal i387
  8. * hardware setup, the extra "status" word is used to save the
  9. * coprocessor status word before entering the handler.
  10. *
  11. * Pentium III FXSR, SSE support
  12. * Gareth Hughes <gareth@valinux.com>, May 2000
  13. *
  14. * The FPU state data structure has had to grow to accommodate the
  15. * extended FPU state required by the Streaming SIMD Extensions.
  16. * There is no documented standard to accomplish this at the moment.
  17. */
  18. struct _fpreg {
  19. unsigned short significand[4];
  20. unsigned short exponent;
  21. };
  22. struct _fpxreg {
  23. unsigned short significand[4];
  24. unsigned short exponent;
  25. unsigned short padding[3];
  26. };
  27. struct _xmmreg {
  28. unsigned long element[4];
  29. };
  30. struct _fpstate {
  31. /* Regular FPU environment */
  32. unsigned long cw;
  33. unsigned long sw;
  34. unsigned long tag;
  35. unsigned long ipoff;
  36. unsigned long cssel;
  37. unsigned long dataoff;
  38. unsigned long datasel;
  39. struct _fpreg _st[8];
  40. unsigned short status;
  41. unsigned short magic; /* 0xffff = regular FPU data only */
  42. /* FXSR FPU environment */
  43. unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
  44. unsigned long mxcsr;
  45. unsigned long reserved;
  46. struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
  47. struct _xmmreg _xmm[8];
  48. unsigned long padding[56];
  49. };
  50. #define X86_FXSR_MAGIC 0x0000
  51. struct sigcontext {
  52. unsigned short gs, __gsh;
  53. unsigned short fs, __fsh;
  54. unsigned short es, __esh;
  55. unsigned short ds, __dsh;
  56. unsigned long edi;
  57. unsigned long esi;
  58. unsigned long ebp;
  59. unsigned long esp;
  60. unsigned long ebx;
  61. unsigned long edx;
  62. unsigned long ecx;
  63. unsigned long eax;
  64. unsigned long trapno;
  65. unsigned long err;
  66. unsigned long eip;
  67. unsigned short cs, __csh;
  68. unsigned long eflags;
  69. unsigned long esp_at_signal;
  70. unsigned short ss, __ssh;
  71. struct _fpstate __user * fpstate;
  72. unsigned long oldmask;
  73. unsigned long cr2;
  74. };
  75. #endif