2 * Copyright (C) 2006 Atmark Techno, Inc.
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
9 #ifndef _ASM_MICROBLAZE_PTRACE_H
10 #define _ASM_MICROBLAZE_PTRACE_H
14 typedef unsigned long microblaze_reg_t
;
58 #define kernel_mode(regs) ((regs)->pt_mode)
59 #define user_mode(regs) (!kernel_mode(regs))
61 #define instruction_pointer(regs) ((regs)->pc)
62 #define profile_pc(regs) instruction_pointer(regs)
64 static inline long regs_return_value(struct pt_regs
*regs
)
69 #else /* __KERNEL__ */
71 /* pt_regs offsets used by gdbserver etc in ptrace syscalls */
72 #define PT_GPR(n) ((n) * sizeof(microblaze_reg_t))
73 #define PT_PC (32 * sizeof(microblaze_reg_t))
74 #define PT_MSR (33 * sizeof(microblaze_reg_t))
75 #define PT_EAR (34 * sizeof(microblaze_reg_t))
76 #define PT_ESR (35 * sizeof(microblaze_reg_t))
77 #define PT_FSR (36 * sizeof(microblaze_reg_t))
78 #define PT_KERNEL_MODE (37 * sizeof(microblaze_reg_t))
82 #endif /* __ASSEMBLY__ */
84 #endif /* _ASM_MICROBLAZE_PTRACE_H */