xref: /openbmc/linux/arch/csky/abiv2/inc/abi/regdef.h (revision 0d3b051adbb72ed81956447d0d1e54d5943ee6f5)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3 
4 #ifndef __ASM_CSKY_REGDEF_H
5 #define __ASM_CSKY_REGDEF_H
6 
7 #ifdef __ASSEMBLY__
8 #define syscallid	r7
9 #else
10 #define syscallid	"r7"
11 #endif
12 
13 #define regs_syscallid(regs) regs->regs[3]
14 #define regs_fp(regs) regs->regs[4]
15 
16 /*
17  * PSR format:
18  * | 31 | 30-24 | 23-16 | 15 14 | 13-10 | 9 | 8-0 |
19  *   S              VEC     TM            MM
20  *
21  *   S: Super Mode
22  * VEC: Exception Number
23  *  TM: Trace Mode
24  *  MM: Memory unaligned addr access
25  */
26 #define DEFAULT_PSR_VALUE	0x80000200
27 
28 #define SYSTRACE_SAVENUM	5
29 
30 #define TRAP0_SIZE		4
31 
32 #endif /* __ASM_CSKY_REGDEF_H */
33