1570af302Sopenharmony_ci#undef __WORDSIZE 2570af302Sopenharmony_ci#define __WORDSIZE 32 3570af302Sopenharmony_ci 4570af302Sopenharmony_citypedef struct user_fpregs_struct { 5570af302Sopenharmony_ci long cwd, swd, twd, fip, fcs, foo, fos, st_space[20]; 6570af302Sopenharmony_ci} elf_fpregset_t; 7570af302Sopenharmony_ci 8570af302Sopenharmony_citypedef struct user_fpxregs_struct { 9570af302Sopenharmony_ci unsigned short cwd, swd, twd, fop; 10570af302Sopenharmony_ci long fip, fcs, foo, fos, mxcsr, reserved; 11570af302Sopenharmony_ci long st_space[32], xmm_space[32], padding[56]; 12570af302Sopenharmony_ci} elf_fpxregset_t; 13570af302Sopenharmony_ci 14570af302Sopenharmony_cistruct user_regs_struct { 15570af302Sopenharmony_ci long ebx, ecx, edx, esi, edi, ebp, eax, xds, xes, xfs, xgs; 16570af302Sopenharmony_ci long orig_eax, eip, xcs, eflags, esp, xss; 17570af302Sopenharmony_ci}; 18570af302Sopenharmony_ci 19570af302Sopenharmony_ci#define ELF_NGREG 17 20570af302Sopenharmony_citypedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; 21570af302Sopenharmony_ci 22570af302Sopenharmony_cistruct user { 23570af302Sopenharmony_ci struct user_regs_struct regs; 24570af302Sopenharmony_ci int u_fpvalid; 25570af302Sopenharmony_ci struct user_fpregs_struct i387; 26570af302Sopenharmony_ci unsigned long u_tsize; 27570af302Sopenharmony_ci unsigned long u_dsize; 28570af302Sopenharmony_ci unsigned long u_ssize; 29570af302Sopenharmony_ci unsigned long start_code; 30570af302Sopenharmony_ci unsigned long start_stack; 31570af302Sopenharmony_ci long signal; 32570af302Sopenharmony_ci int reserved; 33570af302Sopenharmony_ci struct user_regs_struct *u_ar0; 34570af302Sopenharmony_ci struct user_fpregs_struct *u_fpstate; 35570af302Sopenharmony_ci unsigned long magic; 36570af302Sopenharmony_ci char u_comm[32]; 37570af302Sopenharmony_ci int u_debugreg[8]; 38570af302Sopenharmony_ci}; 39570af302Sopenharmony_ci 40570af302Sopenharmony_ci#define PAGE_MASK (~(PAGESIZE-1)) 41570af302Sopenharmony_ci#define NBPG PAGESIZE 42570af302Sopenharmony_ci#define UPAGES 1 43570af302Sopenharmony_ci#define HOST_TEXT_START_ADDR (u.start_code) 44570af302Sopenharmony_ci#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 45