7 #include <asm/ptrace.h>
9 #define DEFINE(sym, val) \
10 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
12 #define DEFINE_LONGS(sym, val) \
13 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
15 #define OFFSET(sym, str, mem) \
16 DEFINE(sym, offsetof(struct str, mem));
20 <<<<<<< HEAD
:arch
/um
/sys
-i386
/user
-offsets
.c
21 OFFSET(HOST_SC_IP
, sigcontext
, eip
);
22 OFFSET(HOST_SC_SP
, sigcontext
, esp
);
23 OFFSET(HOST_SC_FS
, sigcontext
, fs
);
24 OFFSET(HOST_SC_GS
, sigcontext
, gs
);
25 OFFSET(HOST_SC_DS
, sigcontext
, ds
);
26 OFFSET(HOST_SC_ES
, sigcontext
, es
);
27 OFFSET(HOST_SC_SS
, sigcontext
, ss
);
28 OFFSET(HOST_SC_CS
, sigcontext
, cs
);
29 OFFSET(HOST_SC_EFLAGS
, sigcontext
, eflags
);
30 OFFSET(HOST_SC_EAX
, sigcontext
, eax
);
31 OFFSET(HOST_SC_EBX
, sigcontext
, ebx
);
32 OFFSET(HOST_SC_ECX
, sigcontext
, ecx
);
33 OFFSET(HOST_SC_EDX
, sigcontext
, edx
);
34 OFFSET(HOST_SC_EDI
, sigcontext
, edi
);
35 OFFSET(HOST_SC_ESI
, sigcontext
, esi
);
36 OFFSET(HOST_SC_EBP
, sigcontext
, ebp
);
38 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/um
/sys
-i386
/user
-offsets
.c
39 OFFSET(HOST_SC_TRAPNO
, sigcontext
, trapno
);
40 OFFSET(HOST_SC_ERR
, sigcontext
, err
);
41 OFFSET(HOST_SC_CR2
, sigcontext
, cr2
);
42 <<<<<<< HEAD
:arch
/um
/sys
-i386
/user
-offsets
.c
43 OFFSET(HOST_SC_FPSTATE
, sigcontext
, fpstate
);
44 OFFSET(HOST_SC_SIGMASK
, sigcontext
, oldmask
);
45 OFFSET(HOST_SC_FP_CW
, _fpstate
, cw
);
46 OFFSET(HOST_SC_FP_SW
, _fpstate
, sw
);
47 OFFSET(HOST_SC_FP_TAG
, _fpstate
, tag
);
48 OFFSET(HOST_SC_FP_IPOFF
, _fpstate
, ipoff
);
49 OFFSET(HOST_SC_FP_CSSEL
, _fpstate
, cssel
);
50 OFFSET(HOST_SC_FP_DATAOFF
, _fpstate
, dataoff
);
51 OFFSET(HOST_SC_FP_DATASEL
, _fpstate
, datasel
);
52 OFFSET(HOST_SC_FP_ST
, _fpstate
, _st
);
53 OFFSET(HOST_SC_FXSR_ENV
, _fpstate
, _fxsr_env
);
55 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/um
/sys
-i386
/user
-offsets
.c
57 DEFINE_LONGS(HOST_FP_SIZE
, sizeof(struct user_fpregs_struct
));
58 DEFINE_LONGS(HOST_XFP_SIZE
, sizeof(struct user_fpxregs_struct
));
61 DEFINE(HOST_SP
, UESP
);
62 DEFINE(HOST_EFLAGS
, EFL
);
63 DEFINE(HOST_EAX
, EAX
);
64 DEFINE(HOST_EBX
, EBX
);
65 DEFINE(HOST_ECX
, ECX
);
66 DEFINE(HOST_EDX
, EDX
);
67 DEFINE(HOST_ESI
, ESI
);
68 DEFINE(HOST_EDI
, EDI
);
69 DEFINE(HOST_EBP
, EBP
);
76 DEFINE(UM_FRAME_SIZE
, sizeof(struct user_regs_struct
));
78 /* XXX Duplicated between i386 and x86_64 */
79 DEFINE(UM_POLLIN
, POLLIN
);
80 DEFINE(UM_POLLPRI
, POLLPRI
);
81 DEFINE(UM_POLLOUT
, POLLOUT
);
83 DEFINE(UM_PROT_READ
, PROT_READ
);
84 DEFINE(UM_PROT_WRITE
, PROT_WRITE
);
85 DEFINE(UM_PROT_EXEC
, PROT_EXEC
);