user.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #undef __WORDSIZE
  2. #define __WORDSIZE 32
  3. struct user_fpregs_struct
  4. {
  5. long int cwd;
  6. long int swd;
  7. long int twd;
  8. long int fip;
  9. long int fcs;
  10. long int foo;
  11. long int fos;
  12. long int st_space[20];
  13. };
  14. struct user_fpxregs_struct
  15. {
  16. unsigned short int cwd;
  17. unsigned short int swd;
  18. unsigned short int twd;
  19. unsigned short int fop;
  20. long int fip;
  21. long int fcs;
  22. long int foo;
  23. long int fos;
  24. long int mxcsr;
  25. long int reserved;
  26. long int st_space[32];
  27. long int xmm_space[32];
  28. long int padding[56];
  29. };
  30. struct user_regs_struct
  31. {
  32. long int ebx;
  33. long int ecx;
  34. long int edx;
  35. long int esi;
  36. long int edi;
  37. long int ebp;
  38. long int eax;
  39. long int xds;
  40. long int xes;
  41. long int xfs;
  42. long int xgs;
  43. long int orig_eax;
  44. long int eip;
  45. long int xcs;
  46. long int eflags;
  47. long int esp;
  48. long int xss;
  49. };
  50. struct user
  51. {
  52. struct user_regs_struct regs;
  53. int u_fpvalid;
  54. struct user_fpregs_struct i387;
  55. unsigned long int u_tsize;
  56. unsigned long int u_dsize;
  57. unsigned long int u_ssize;
  58. unsigned long start_code;
  59. unsigned long start_stack;
  60. long int signal;
  61. int reserved;
  62. struct user_regs_struct *u_ar0;
  63. struct user_fpregs_struct *u_fpstate;
  64. unsigned long int magic;
  65. char u_comm[32];
  66. int u_debugreg[8];
  67. };
  68. #define PAGE_MASK (~(PAGE_SIZE-1))
  69. #define NBPG PAGE_SIZE
  70. #define UPAGES 1
  71. #define HOST_TEXT_START_ADDR (u.start_code)
  72. #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)