user.h 1.1 KB
Newer Older
1
#undef __WORDSIZE
R
Rich Felker 已提交
2
#define __WORDSIZE 64
3

4
typedef struct user_fpregs_struct
5
{
6 7
	uint16_t cwd, swd, ftw, fop;
	uint64_t rip, rdp;
8
	uint32_t mxcsr, mxcr_mask;
9
	uint32_t st_space[32], xmm_space[64], padding[24];
10
} elf_fpregset_t;
11

12
struct user_regs_struct {
13 14 15
	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;
16
};
17 18
#define ELF_NGREG 27
typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
19

20
struct user {
21 22 23
	struct user_regs_struct		regs;
	int				u_fpvalid;
	struct user_fpregs_struct	i387;
24 25 26
	unsigned long			u_tsize;
	unsigned long			u_dsize;
	unsigned long			u_ssize;
27 28
	unsigned long			start_code;
	unsigned long			start_stack;
29
	long				signal;
30 31 32
	int				reserved;
	struct user_regs_struct		*u_ar0;
	struct user_fpregs_struct	*u_fpstate;
33
	unsigned long			magic;
34
	char				u_comm[32];
35
	unsigned long			u_debugreg[8];
36 37 38 39 40 41 42
};

#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)