Go to the documentation of this file.
5 #ifndef __SYS_PTRACE_PPC_H
6 #define __SYS_PTRACE_PPC_H
8 #include <linux/types.h>
13 #define PPC_REG unsigned long
15 #define PPC_REG unsigned long
34 #define NUM_REGS (sizeof(struct sys_pt_regs_s) / sizeof(PPC_REG))
40 #define UM_MAX_REG (PT_FPR0)
41 #define UM_MAX_REG_OFFSET (UM_MAX_REG * sizeof(PPC_REG))
43 #define EMPTY_REGS { { [ 0 ... NUM_REGS - 1] = 0 } }
45 #define UM_REG(r, n) ((r)->regs[n])
47 #define UM_SYSCALL_RET(r) UM_REG(r, PT_R3)
48 #define UM_SP(r) UM_REG(r, PT_R1)
49 #define UM_IP(r) UM_REG(r, PT_NIP)
50 #define UM_ELF_ZERO(r) UM_REG(r, PT_FPSCR)
51 #define UM_SYSCALL_NR(r) UM_REG(r, PT_R0)
52 #define UM_SYSCALL_ARG1(r) UM_REG(r, PT_ORIG_R3)
53 #define UM_SYSCALL_ARG2(r) UM_REG(r, PT_R4)
54 #define UM_SYSCALL_ARG3(r) UM_REG(r, PT_R5)
55 #define UM_SYSCALL_ARG4(r) UM_REG(r, PT_R6)
56 #define UM_SYSCALL_ARG5(r) UM_REG(r, PT_R7)
57 #define UM_SYSCALL_ARG6(r) UM_REG(r, PT_R8)
59 #define UM_SYSCALL_NR_OFFSET (PT_R0 * sizeof(PPC_REG))
60 #define UM_SYSCALL_RET_OFFSET (PT_R3 * sizeof(PPC_REG))
61 #define UM_SYSCALL_ARG1_OFFSET (PT_R3 * sizeof(PPC_REG))
62 #define UM_SYSCALL_ARG2_OFFSET (PT_R4 * sizeof(PPC_REG))
63 #define UM_SYSCALL_ARG3_OFFSET (PT_R5 * sizeof(PPC_REG))
64 #define UM_SYSCALL_ARG4_OFFSET (PT_R6 * sizeof(PPC_REG))
65 #define UM_SYSCALL_ARG5_OFFSET (PT_R7 * sizeof(PPC_REG))
66 #define UM_SYSCALL_ARG6_OFFSET (PT_R8 * sizeof(PPC_REG))
67 #define UM_SP_OFFSET (PT_R1 * sizeof(PPC_REG))
68 #define UM_IP_OFFSET (PT_NIP * sizeof(PPC_REG))
69 #define UM_ELF_ZERO_OFFSET (PT_R3 * sizeof(PPC_REG))
71 #define UM_SET_SYSCALL_RETURN(_regs, result) \
74 (_regs)->regs[PT_CCR] |= 0x10000000; \
75 UM_SYSCALL_RET((_regs)) = -result; \
77 UM_SYSCALL_RET((_regs)) = result; \
82 #define UM_FIX_EXEC_STACK(sp) shove_aux_table(sp);
87 #undef UML_HAVE_GETREGS
88 #undef UML_HAVE_GETFPREGS
89 #undef UML_HAVE_SETREGS
90 #undef UML_HAVE_SETFPREGS