1570af302Sopenharmony_ci#undef __WORDSIZE 2570af302Sopenharmony_ci#define __WORDSIZE 64 3570af302Sopenharmony_ci 4570af302Sopenharmony_citypedef union { 5570af302Sopenharmony_ci double d; 6570af302Sopenharmony_ci float f; 7570af302Sopenharmony_ci} elf_fpreg_t; 8570af302Sopenharmony_ci 9570af302Sopenharmony_citypedef struct { 10570af302Sopenharmony_ci unsigned fpc; 11570af302Sopenharmony_ci elf_fpreg_t fprs[16]; 12570af302Sopenharmony_ci} elf_fpregset_t; 13570af302Sopenharmony_ci 14570af302Sopenharmony_ci#define ELF_NGREG 27 15570af302Sopenharmony_citypedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; 16570af302Sopenharmony_ci 17570af302Sopenharmony_cistruct _user_psw_struct { 18570af302Sopenharmony_ci unsigned long mask, addr; 19570af302Sopenharmony_ci}; 20570af302Sopenharmony_ci 21570af302Sopenharmony_cistruct _user_fpregs_struct { 22570af302Sopenharmony_ci unsigned fpc; 23570af302Sopenharmony_ci double fprs[16]; 24570af302Sopenharmony_ci}; 25570af302Sopenharmony_ci 26570af302Sopenharmony_cistruct _user_per_struct { 27570af302Sopenharmony_ci unsigned long control_regs[3]; 28570af302Sopenharmony_ci unsigned single_step : 1; 29570af302Sopenharmony_ci unsigned instruction_fetch : 1; 30570af302Sopenharmony_ci unsigned : 30; 31570af302Sopenharmony_ci unsigned long starting_addr, ending_addr; 32570af302Sopenharmony_ci unsigned short perc_atmid; 33570af302Sopenharmony_ci unsigned long address; 34570af302Sopenharmony_ci unsigned char access_id; 35570af302Sopenharmony_ci}; 36570af302Sopenharmony_ci 37570af302Sopenharmony_cistruct _user_regs_struct { 38570af302Sopenharmony_ci struct _user_psw_struct psw; 39570af302Sopenharmony_ci unsigned long gprs[16]; 40570af302Sopenharmony_ci unsigned acrs[16]; 41570af302Sopenharmony_ci unsigned long orig_gpr2; 42570af302Sopenharmony_ci struct _user_fpregs_struct fp_regs; 43570af302Sopenharmony_ci struct _user_per_struct per_info; 44570af302Sopenharmony_ci unsigned long ieee_instruction_pointer; 45570af302Sopenharmony_ci}; 46570af302Sopenharmony_ci 47570af302Sopenharmony_cistruct user { 48570af302Sopenharmony_ci struct _user_regs_struct regs; 49570af302Sopenharmony_ci unsigned long u_tsize, u_dsize, u_ssize; 50570af302Sopenharmony_ci unsigned long start_code, start_stack; 51570af302Sopenharmony_ci long signal; 52570af302Sopenharmony_ci struct _user_regs_struct *u_ar0; 53570af302Sopenharmony_ci unsigned long magic; 54570af302Sopenharmony_ci char u_comm[32]; 55570af302Sopenharmony_ci}; 56570af302Sopenharmony_ci 57570af302Sopenharmony_ci#define PAGE_MASK (~(PAGESIZE-1)) 58570af302Sopenharmony_ci#define NBPG PAGESIZE 59570af302Sopenharmony_ci#define UPAGES 1 60570af302Sopenharmony_ci#define HOST_TEXT_START_ADDR (u.start_code) 61570af302Sopenharmony_ci#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 62570af302Sopenharmony_ci 63