1570af302Sopenharmony_ci#undef __WORDSIZE 2570af302Sopenharmony_ci#define __WORDSIZE 64 3570af302Sopenharmony_ci 4570af302Sopenharmony_citypedef struct user_fpregs_struct { 5570af302Sopenharmony_ci uint16_t cwd, swd, ftw, fop; 6570af302Sopenharmony_ci uint64_t rip, rdp; 7570af302Sopenharmony_ci uint32_t mxcsr, mxcr_mask; 8570af302Sopenharmony_ci uint32_t st_space[32], xmm_space[64], padding[24]; 9570af302Sopenharmony_ci} elf_fpregset_t; 10570af302Sopenharmony_ci 11570af302Sopenharmony_cistruct user_regs_struct { 12570af302Sopenharmony_ci unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8; 13570af302Sopenharmony_ci unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip; 14570af302Sopenharmony_ci unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs; 15570af302Sopenharmony_ci}; 16570af302Sopenharmony_ci#define ELF_NGREG 27 17570af302Sopenharmony_citypedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG]; 18570af302Sopenharmony_ci 19570af302Sopenharmony_cistruct user { 20570af302Sopenharmony_ci struct user_regs_struct regs; 21570af302Sopenharmony_ci int u_fpvalid; 22570af302Sopenharmony_ci struct user_fpregs_struct i387; 23570af302Sopenharmony_ci unsigned long u_tsize; 24570af302Sopenharmony_ci unsigned long u_dsize; 25570af302Sopenharmony_ci unsigned long u_ssize; 26570af302Sopenharmony_ci unsigned long start_code; 27570af302Sopenharmony_ci unsigned long start_stack; 28570af302Sopenharmony_ci long signal; 29570af302Sopenharmony_ci int reserved; 30570af302Sopenharmony_ci struct user_regs_struct *u_ar0; 31570af302Sopenharmony_ci struct user_fpregs_struct *u_fpstate; 32570af302Sopenharmony_ci unsigned long magic; 33570af302Sopenharmony_ci char u_comm[32]; 34570af302Sopenharmony_ci unsigned long u_debugreg[8]; 35570af302Sopenharmony_ci}; 36570af302Sopenharmony_ci 37570af302Sopenharmony_ci#define PAGE_MASK (~(PAGESIZE-1)) 38570af302Sopenharmony_ci#define NBPG PAGESIZE 39570af302Sopenharmony_ci#define UPAGES 1 40570af302Sopenharmony_ci#define HOST_TEXT_START_ADDR (u.start_code) 41570af302Sopenharmony_ci#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 42