diff options
Diffstat (limited to 'arch/um/sys-i386/user-offsets.c')
-rw-r--r-- | arch/um/sys-i386/user-offsets.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/um/sys-i386/user-offsets.c b/arch/um/sys-i386/user-offsets.c deleted file mode 100644 index 5f883bfe773f..000000000000 --- a/arch/um/sys-i386/user-offsets.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stddef.h> | ||
3 | #include <signal.h> | ||
4 | #include <sys/poll.h> | ||
5 | #include <sys/user.h> | ||
6 | #include <sys/mman.h> | ||
7 | #include <asm/ptrace.h> | ||
8 | |||
9 | #define DEFINE(sym, val) \ | ||
10 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
11 | |||
12 | #define DEFINE_LONGS(sym, val) \ | ||
13 | asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long))) | ||
14 | |||
15 | #define OFFSET(sym, str, mem) \ | ||
16 | DEFINE(sym, offsetof(struct str, mem)); | ||
17 | |||
18 | void foo(void) | ||
19 | { | ||
20 | OFFSET(HOST_SC_TRAPNO, sigcontext, trapno); | ||
21 | OFFSET(HOST_SC_ERR, sigcontext, err); | ||
22 | OFFSET(HOST_SC_CR2, sigcontext, cr2); | ||
23 | |||
24 | DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct)); | ||
25 | DEFINE_LONGS(HOST_FPX_SIZE, sizeof(struct user_fpxregs_struct)); | ||
26 | |||
27 | DEFINE(HOST_IP, EIP); | ||
28 | DEFINE(HOST_SP, UESP); | ||
29 | DEFINE(HOST_EFLAGS, EFL); | ||
30 | DEFINE(HOST_EAX, EAX); | ||
31 | DEFINE(HOST_EBX, EBX); | ||
32 | DEFINE(HOST_ECX, ECX); | ||
33 | DEFINE(HOST_EDX, EDX); | ||
34 | DEFINE(HOST_ESI, ESI); | ||
35 | DEFINE(HOST_EDI, EDI); | ||
36 | DEFINE(HOST_EBP, EBP); | ||
37 | DEFINE(HOST_CS, CS); | ||
38 | DEFINE(HOST_SS, SS); | ||
39 | DEFINE(HOST_DS, DS); | ||
40 | DEFINE(HOST_FS, FS); | ||
41 | DEFINE(HOST_ES, ES); | ||
42 | DEFINE(HOST_GS, GS); | ||
43 | DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct)); | ||
44 | |||
45 | /* XXX Duplicated between i386 and x86_64 */ | ||
46 | DEFINE(UM_POLLIN, POLLIN); | ||
47 | DEFINE(UM_POLLPRI, POLLPRI); | ||
48 | DEFINE(UM_POLLOUT, POLLOUT); | ||
49 | |||
50 | DEFINE(UM_PROT_READ, PROT_READ); | ||
51 | DEFINE(UM_PROT_WRITE, PROT_WRITE); | ||
52 | DEFINE(UM_PROT_EXEC, PROT_EXEC); | ||
53 | } | ||