um: merge Makefile-{i386,x86_64}
[pandora-kernel.git] / arch / x86 / um / shared / sysdep / ptrace_user_64.h
1 /*
2  * Copyright 2003 PathScale, Inc.
3  *
4  * Licensed under the GPL
5  */
6
7 #ifndef __SYSDEP_X86_64_PTRACE_USER_H__
8 #define __SYSDEP_X86_64_PTRACE_USER_H__
9
10 #define __FRAME_OFFSETS
11 #include <sys/ptrace.h>
12 #include <linux/ptrace.h>
13 #include <asm/ptrace.h>
14 #undef __FRAME_OFFSETS
15 #include <generated/user_constants.h>
16
17 #define PT_INDEX(off) ((off) / sizeof(unsigned long))
18
19 #define PT_SYSCALL_NR(regs) ((regs)[PT_INDEX(ORIG_RAX)])
20 #define PT_SYSCALL_NR_OFFSET (ORIG_RAX)
21
22 #define PT_SYSCALL_RET_OFFSET (RAX)
23
24 /*
25  * x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though
26  * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the
27  * 2.4 name and value for 2.4 host compatibility.
28  */
29 #ifndef PTRACE_OLDSETOPTIONS
30 #define PTRACE_OLDSETOPTIONS 21
31 #endif
32
33 #define REGS_IP_INDEX PT_INDEX(RIP)
34 #define REGS_SP_INDEX PT_INDEX(RSP)
35
36 #define FP_SIZE (HOST_FP_SIZE)
37
38 #endif