um: switch UPT_SET_RETURN_VALUE and regs_return_value to pt_regs
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / x86 / um / asm / ptrace.h
1 #ifndef __UM_X86_PTRACE_H
2 #define __UM_X86_PTRACE_H
3
4 #ifdef CONFIG_X86_32
5 # include "ptrace_32.h"
6 #else
7 # include "ptrace_64.h"
8 #endif
9
10 #define PT_REGS_AX(r) UPT_AX(&(r)->regs)
11 #define PT_REGS_BX(r) UPT_BX(&(r)->regs)
12 #define PT_REGS_CX(r) UPT_CX(&(r)->regs)
13 #define PT_REGS_DX(r) UPT_DX(&(r)->regs)
14
15 #define PT_REGS_SI(r) UPT_SI(&(r)->regs)
16 #define PT_REGS_DI(r) UPT_DI(&(r)->regs)
17 #define PT_REGS_BP(r) UPT_BP(&(r)->regs)
18 #define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
19
20 #define PT_REGS_CS(r) UPT_CS(&(r)->regs)
21 #define PT_REGS_SS(r) UPT_SS(&(r)->regs)
22 #define PT_REGS_DS(r) UPT_DS(&(r)->regs)
23 #define PT_REGS_ES(r) UPT_ES(&(r)->regs)
24
25 #define PT_REGS_ORIG_SYSCALL(r) PT_REGS_AX(r)
26 #define PT_REGS_SYSCALL_RET(r) PT_REGS_AX(r)
27
28 #define PT_FIX_EXEC_STACK(sp) do ; while(0)
29
30 #define profile_pc(regs) PT_REGS_IP(regs)
31
32 #define UPT_RESTART_SYSCALL(r) (UPT_IP(r) -= 2)
33 #define PT_REGS_SET_SYSCALL_RETURN(r, res) (PT_REGS_AX(r) = (res))
34
35 static inline long regs_return_value(struct pt_regs *regs)
36 {
37         return PT_REGS_AX(regs);
38 }
39 #endif /* __UM_X86_PTRACE_H */