1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2011-09-15     Bernard      first version
9  */
10 
11 #ifndef __ARMV7_H__
12 #define __ARMV7_H__
13 
14 /* the exception stack without VFP registers */
15 struct rt_hw_exp_stack
16 {
17     unsigned long r0;
18     unsigned long r1;
19     unsigned long r2;
20     unsigned long r3;
21     unsigned long r4;
22     unsigned long r5;
23     unsigned long r6;
24     unsigned long r7;
25     unsigned long r8;
26     unsigned long r9;
27     unsigned long r10;
28     unsigned long fp;
29     unsigned long ip;
30     unsigned long sp;
31     unsigned long lr;
32     unsigned long pc;
33     unsigned long cpsr;
34 };
35 
36 struct rt_hw_stack
37 {
38     unsigned long cpsr;
39     unsigned long r0;
40     unsigned long r1;
41     unsigned long r2;
42     unsigned long r3;
43     unsigned long r4;
44     unsigned long r5;
45     unsigned long r6;
46     unsigned long r7;
47     unsigned long r8;
48     unsigned long r9;
49     unsigned long r10;
50     unsigned long fp;
51     unsigned long ip;
52     unsigned long lr;
53     unsigned long pc;
54 };
55 
56 #define USERMODE    0x10
57 #define FIQMODE     0x11
58 #define IRQMODE     0x12
59 #define SVCMODE     0x13
60 #define MONITORMODE 0x16
61 #define ABORTMODE   0x17
62 #define HYPMODE     0x1b
63 #define UNDEFMODE   0x1b
64 #define MODEMASK    0x1f
65 #define NOINT       0xc0
66 
67 #define T_Bit       (1<<5)
68 #define F_Bit       (1<<6)
69 #define I_Bit       (1<<7)
70 #define A_Bit       (1<<8)
71 #define E_Bit       (1<<9)
72 #define J_Bit       (1<<24)
73 
74 #endif
75