Commit | Line | Data |
---|---|---|
2b438454 MS |
1 | /* |
2 | * Copyright (C) 2006 Atmark Techno, Inc. | |
3 | * | |
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 | |
6 | * for more details. | |
7 | */ | |
2b438454 MS |
8 | #ifndef _ASM_MICROBLAZE_PTRACE_H |
9 | #define _ASM_MICROBLAZE_PTRACE_H | |
10 | ||
3cb0eab2 | 11 | #include <uapi/asm/ptrace.h> |
2b438454 | 12 | |
3cb0eab2 | 13 | #ifndef __ASSEMBLY__ |
ac3efab5 | 14 | #define kernel_mode(regs) ((regs)->pt_mode) |
2b438454 MS |
15 | #define user_mode(regs) (!kernel_mode(regs)) |
16 | ||
17 | #define instruction_pointer(regs) ((regs)->pc) | |
18 | #define profile_pc(regs) instruction_pointer(regs) | |
5208ba24 | 19 | #define user_stack_pointer(regs) ((regs)->r1) |
2b438454 | 20 | |
d7e7528b EP |
21 | static inline long regs_return_value(struct pt_regs *regs) |
22 | { | |
23 | return regs->r3; | |
24 | } | |
25 | ||
2b438454 | 26 | #endif /* __ASSEMBLY__ */ |
2b438454 | 27 | #endif /* _ASM_MICROBLAZE_PTRACE_H */ |