998c062ada7e96894abddddbb89b8b73d1dd7c5c
[musl] / arch / i386 / bits / user.h
1 #undef __WORDSIZE
2 #define __WORDSIZE 32
3
4 struct user_fpregs_struct
5 {
6         long cwd, swd, twd, fip, fcs, foo, fos, st_space[20];
7 };
8
9 struct user_fpxregs_struct
10 {
11         unsigned short cwd, swd, twd, fop;
12         long fip, fcs, foo, fos, mxcsr, reserved;
13         long st_space[32], xmm_space[32], padding[56];
14 };
15
16 struct user_regs_struct
17 {
18         long ebx, ecx, edx, esi, edi, ebp, eax, xds, xes, xfs, xgs;
19         long orig_eax, eip, xcs, eflags, esp, xss;
20 };
21
22 struct user
23 {
24         struct user_regs_struct         regs;
25         int                             u_fpvalid;
26         struct user_fpregs_struct       i387;
27         unsigned long                   u_tsize;
28         unsigned long                   u_dsize;
29         unsigned long                   u_ssize;
30         unsigned long                   start_code;
31         unsigned long                   start_stack;
32         long                            signal;
33         int                             reserved;
34         struct user_regs_struct         *u_ar0;
35         struct user_fpregs_struct       *u_fpstate;
36         unsigned long                   magic;
37         char                            u_comm[32];
38         int                             u_debugreg[8];
39 };
40
41 #define PAGE_MASK               (~(PAGE_SIZE-1))
42 #define NBPG                    PAGE_SIZE
43 #define UPAGES                  1
44 #define HOST_TEXT_START_ADDR    (u.start_code)
45 #define HOST_STACK_END_ADDR     (u.start_stack + u.u_ssize * NBPG)