2 * Copyright (C) 2011 Andes Technology Corporation
3 * Copyright (C) 2010 Shawn Lin (nobuhiro@andestech.com)
4 * Copyright (C) 2011 Macpaul Lin (macpaul@andestech.com)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #ifndef __ASM_NDS_PTRACE_H
11 #define __ASM_NDS_PTRACE_H
16 #define MODE_MASK (0x03<<3)
21 /* this struct defines the way the registers are stored on the
22 stack during a system call. */
24 #define NDS32_REG long
40 NDS32_REG r[26]; /* r0 - r25 */
41 NDS32_REG fp; /* r28 */
42 NDS32_REG gp; /* r29 */
43 NDS32_REG lp; /* r30 */
48 #define processor_mode(regs) \
49 (((regs)->ipsw & MODE_MASK) >> 3)
51 #define interrupts_enabled(regs) \
52 ((regs)->ipsw & GIE_BIT)
55 * Offsets used by 'ptrace' system call interface.
56 * These can't be changed without breaking binary compatibility
86 #endif /* __ASSEMBLY__ */
88 #endif /* __ASM_NDS_PTRACE_H */