7 #define __FRAME_OFFSETS
8 #include <asm/ptrace.h>
12 #define __SYSCALL_I386(nr, sym, qual) [nr] = 1,
13 static char syscalls
[] = {
14 #include <asm/syscalls_32.h>
17 #define __SYSCALL_64(nr, sym, qual) [nr] = 1,
18 static char syscalls
[] = {
19 #include <asm/syscalls_64.h>
23 #define DEFINE(sym, val) \
24 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
26 #define DEFINE_LONGS(sym, val) \
27 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
32 DEFINE_LONGS(HOST_FP_SIZE
, sizeof(struct user_fpregs_struct
));
33 DEFINE_LONGS(HOST_FPX_SIZE
, sizeof(struct user_fpxregs_struct
));
36 DEFINE(HOST_SP
, UESP
);
37 DEFINE(HOST_EFLAGS
, EFL
);
51 DEFINE(HOST_ORIG_AX
, ORIG_EAX
);
53 DEFINE(HOST_FP_SIZE
, sizeof(struct _xstate
) / sizeof(unsigned long));
54 DEFINE_LONGS(HOST_BX
, RBX
);
55 DEFINE_LONGS(HOST_CX
, RCX
);
56 DEFINE_LONGS(HOST_DI
, RDI
);
57 DEFINE_LONGS(HOST_SI
, RSI
);
58 DEFINE_LONGS(HOST_DX
, RDX
);
59 DEFINE_LONGS(HOST_BP
, RBP
);
60 DEFINE_LONGS(HOST_AX
, RAX
);
61 DEFINE_LONGS(HOST_R8
, R8
);
62 DEFINE_LONGS(HOST_R9
, R9
);
63 DEFINE_LONGS(HOST_R10
, R10
);
64 DEFINE_LONGS(HOST_R11
, R11
);
65 DEFINE_LONGS(HOST_R12
, R12
);
66 DEFINE_LONGS(HOST_R13
, R13
);
67 DEFINE_LONGS(HOST_R14
, R14
);
68 DEFINE_LONGS(HOST_R15
, R15
);
69 DEFINE_LONGS(HOST_ORIG_AX
, ORIG_RAX
);
70 DEFINE_LONGS(HOST_CS
, CS
);
71 DEFINE_LONGS(HOST_SS
, SS
);
72 DEFINE_LONGS(HOST_EFLAGS
, EFLAGS
);
74 DEFINE_LONGS(HOST_FS
, FS
);
75 DEFINE_LONGS(HOST_GS
, GS
);
76 DEFINE_LONGS(HOST_DS
, DS
);
77 DEFINE_LONGS(HOST_ES
, ES
);
80 DEFINE_LONGS(HOST_IP
, RIP
);
81 DEFINE_LONGS(HOST_SP
, RSP
);
84 DEFINE(UM_FRAME_SIZE
, sizeof(struct user_regs_struct
));
85 DEFINE(UM_POLLIN
, POLLIN
);
86 DEFINE(UM_POLLPRI
, POLLPRI
);
87 DEFINE(UM_POLLOUT
, POLLOUT
);
89 DEFINE(UM_PROT_READ
, PROT_READ
);
90 DEFINE(UM_PROT_WRITE
, PROT_WRITE
);
91 DEFINE(UM_PROT_EXEC
, PROT_EXEC
);
93 DEFINE(__NR_syscall_max
, sizeof(syscalls
) - 1);
94 DEFINE(NR_syscalls
, sizeof(syscalls
));