2011-02-15 12:32:09 +00:00
|
|
|
#undef __WORDSIZE
|
2011-09-22 19:25:07 +00:00
|
|
|
#define __WORDSIZE 64
|
2011-02-15 12:32:09 +00:00
|
|
|
|
2012-11-26 03:28:18 +00:00
|
|
|
typedef struct user_fpregs_struct
|
2011-02-15 12:32:09 +00:00
|
|
|
{
|
2011-09-22 19:36:25 +00:00
|
|
|
uint16_t cwd, swd, ftw, fop;
|
|
|
|
uint64_t rip, rdp;
|
|
|
|
uint32_t mxcsr, mxcs_mask;
|
|
|
|
uint32_t st_space[32], xmm_space[64], padding[24];
|
2012-11-26 03:28:18 +00:00
|
|
|
} elf_fpregset_t;
|
2011-02-15 12:32:09 +00:00
|
|
|
|
|
|
|
struct user_regs_struct
|
|
|
|
{
|
2011-09-22 19:36:25 +00:00
|
|
|
unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
|
|
|
|
unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
|
|
|
|
unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
|
2011-02-15 12:32:09 +00:00
|
|
|
};
|
2012-11-26 03:28:18 +00:00
|
|
|
#define ELF_NGREG 27
|
|
|
|
typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
|
2011-02-15 12:32:09 +00:00
|
|
|
|
|
|
|
struct user
|
|
|
|
{
|
|
|
|
struct user_regs_struct regs;
|
|
|
|
int u_fpvalid;
|
|
|
|
struct user_fpregs_struct i387;
|
2011-09-22 19:36:25 +00:00
|
|
|
unsigned long u_tsize;
|
|
|
|
unsigned long u_dsize;
|
|
|
|
unsigned long u_ssize;
|
2011-02-15 12:32:09 +00:00
|
|
|
unsigned long start_code;
|
|
|
|
unsigned long start_stack;
|
2011-09-22 19:36:25 +00:00
|
|
|
long signal;
|
2011-02-15 12:32:09 +00:00
|
|
|
int reserved;
|
|
|
|
struct user_regs_struct *u_ar0;
|
|
|
|
struct user_fpregs_struct *u_fpstate;
|
2011-09-22 19:36:25 +00:00
|
|
|
unsigned long magic;
|
2011-02-15 12:32:09 +00:00
|
|
|
char u_comm[32];
|
2011-09-22 19:36:25 +00:00
|
|
|
unsigned long u_debugreg[8];
|
2011-02-15 12:32:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define PAGE_MASK (~(PAGE_SIZE-1))
|
|
|
|
#define NBPG PAGE_SIZE
|
|
|
|
#define UPAGES 1
|
|
|
|
#define HOST_TEXT_START_ADDR (u.start_code)
|
|
|
|
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|