]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/arch/x32/bits/user.h
4073cc06ffbb638993021e129e48ef9aa4799729
[wasi-libc.git] / libc-top-half / musl / arch / x32 / bits / user.h
1 #undef __WORDSIZE
2 #define __WORDSIZE 64
3
4 typedef struct user_fpregs_struct {
5 uint16_t cwd, swd, ftw, fop;
6 uint64_t rip, rdp;
7 uint32_t mxcsr, mxcr_mask;
8 uint32_t st_space[32], xmm_space[64], padding[24];
9 } elf_fpregset_t;
10
11 struct user_regs_struct {
12 unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
13 unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
14 unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
15 };
16 #define ELF_NGREG 27
17 typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
18
19 struct user {
20 struct user_regs_struct regs;
21 int u_fpvalid;
22 struct user_fpregs_struct i387;
23 unsigned long u_tsize;
24 unsigned long u_dsize;
25 unsigned long u_ssize;
26 unsigned long start_code;
27 unsigned long start_stack;
28 long signal;
29 int reserved;
30 struct user_regs_struct *u_ar0;
31 struct user_fpregs_struct *u_fpstate;
32 unsigned long magic;
33 char u_comm[32];
34 unsigned long u_debugreg[8];
35 };
36
37 #define PAGE_MASK (~(PAGESIZE-1))
38 #define NBPG PAGESIZE
39 #define UPAGES 1
40 #define HOST_TEXT_START_ADDR (u.start_code)
41 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)