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 p0; /* r26 - used by OS */
42 NDS32_REG p1; /* r27 - used by OS */
43 NDS32_REG fp; /* r28 */
44 NDS32_REG gp; /* r29 */
45 NDS32_REG lp; /* r30 */
50 #define processor_mode(regs) \
51 (((regs)->ipsw & MODE_MASK) >> 3)
53 #define interrupts_enabled(regs) \
54 ((regs)->ipsw & GIE_BIT)
57 * Offsets used by 'ptrace' system call interface.
58 * These can't be changed without breaking binary compatibility
88 #endif /* __ASSEMBLY__ */
90 #endif /* __ASM_NDS_PTRACE_H */