1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef __ASM_CSKY_REGDEF_H
4 #define __ASM_CSKY_REGDEF_H
5 
6 #ifdef __ASSEMBLY__
7 #define syscallid	r1
8 #else
9 #define syscallid	"r1"
10 #endif
11 
12 #define regs_syscallid(regs) regs->regs[9]
13 #define regs_fp(regs) regs->regs[2]
14 
15 /*
16  * PSR format:
17  * | 31 | 30-24 | 23-16 | 15 14 | 13-0 |
18  *   S     CPID     VEC     TM
19  *
20  *    S: Super Mode
21  * CPID: Coprocessor id, only 15 for MMU
22  *  VEC: Exception Number
23  *   TM: Trace Mode
24  */
25 #define DEFAULT_PSR_VALUE	0x8f000000
26 
27 #define SYSTRACE_SAVENUM	2
28 
29 #define TRAP0_SIZE		2
30 
31 #endif /* __ASM_CSKY_REGDEF_H */
32