-
Notifications
You must be signed in to change notification settings - Fork 15
/
register_mask.h
155 lines (137 loc) · 3.4 KB
/
register_mask.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#ifndef REGISTER_MASK_H
#define REGISTER_MASK_H
// To avoid inclusion on the asm files of GCC
#ifndef L_m16addsf3
#ifndef L_m16subsf3
#ifndef L_m16mulsf3
#ifndef L_m16divsf3
#ifndef L_m16eqsf2
#ifndef L_m16nesf2
#ifndef L_m16gtsf2
#ifndef L_m16gesf2
#ifndef L_m16lesf2
#ifndef L_m16ltsf2
#ifndef L_m16fltsisf
#ifndef L_m16fixsfsi
#ifndef L_m16adddf3
#ifndef L_m16subdf3
#ifndef L_m16muldf3
#ifndef L_m16divdf3
#ifndef L_m16extsfdf2
#ifndef L_m16trdfsf2
#ifndef L_m16eqdf2
#ifndef L_m16nedf2
#ifndef L_m16gtdf2
#ifndef L_m16gedf2
#ifndef L_m16ledf2
#ifndef L_m16ltdf2
#ifndef L_m16fltsidf
#ifndef L_m16fixdfsi
#ifndef L_m16retsf
#ifndef L_m16retdf
#ifndef L_m16stub1
#ifndef L_m16stub2
#ifndef L_m16stub5
#ifndef L_m16stub6
#ifndef L_m16stub9
#ifndef L_m16stub10
#ifndef L_m16stubsf0
#ifndef L_m16stubsf1
#ifndef L_m16stubsf2
#ifndef L_m16stubsf5
#ifndef L_m16stubsf6
#ifndef L_m16stubsf9
#ifndef L_m16stubsf10
#ifndef L_m16stubdf0
#ifndef L_m16stubdf1
#ifndef L_m16stubdf2
#ifndef L_m16stubdf5
#ifndef L_m16stubdf6
#ifndef L_m16stubdf9
#ifndef L_m16stubdf10
/*
* These registers will not be used by GCC to
* output mips32 code, when WITH_REDUCED_REGS
* is set.
* **** DO NOT CHANGE THIS WITHOUT MODIFYING
* **** THE IRQ HANDLER ACCORDINGLY !
*/
//#ifdef __REDUCED_REGS__
/*
* t-registers are also used as pseudo stack
* for register save/restore in mips16
* 3 registers seem enough for most functions
*/
/*
register unsigned long masked_t0 asm("$8");
register unsigned long masked_t1 asm("$9");
register unsigned long masked_t2 asm("$10");
*/
register unsigned long masked_t3 asm("$11");
register unsigned long masked_t4 asm("$12");
register unsigned long masked_t5 asm("$13");
register unsigned long masked_t6 asm("$14");
register unsigned long masked_t7 asm("$15");
/* t9 ($25) has a specific meaning from GCC's point-of-view
* (PIC_FN_REGISTER, used in abi calls) and is used explicitly by
* ct-gcc for mips16 compatible sibling calls in 32 bits,
* therefore IT MUST NOT BE MASKED (if it is compilation will fail
* anyway)
*/
register unsigned long masked_s2 asm("$18");
register unsigned long masked_s3 asm("$19");
register unsigned long masked_s4 asm("$20");
register unsigned long masked_s5 asm("$21");
register unsigned long masked_s6 asm("$22");
register unsigned long masked_s7 asm("$23");
register unsigned long masked_fp asm("$30");
//#endif
#endif // L_m16stubdf10
#endif // L_m16stubdf9
#endif // L_m16stubdf6
#endif // L_m16stubdf5
#endif // L_m16stubdf2
#endif // L_m16stubdf1
#endif // L_m16stubdf0
#endif // L_m16stubsf10
#endif // L_m16stubsf9
#endif // L_m16stubsf6
#endif // L_m16stubsf5
#endif // L_m16stubsf2
#endif // L_m16stubsf1
#endif // L_m16stubsf0
#endif // L_m16stub10
#endif // L_m16stub9
#endif // L_m16stub6
#endif // L_m16stub5
#endif // L_m16stub2
#endif // L_m16stub1
#endif // L_m16retdf
#endif // L_m16retsf
#endif // L_m16fixdfsi
#endif // L_m16fltsidf
#endif // L_m16ltdf2
#endif // L_m16ledf2
#endif // L_m16gedf2
#endif // L_m16gtdf2
#endif // L_m16nedf2
#endif // L_m16eqdf2
#endif // L_m16trdfsf2
#endif // L_m16extsfdf2
#endif // L_m16divdf3
#endif // L_m16muldf3
#endif // L_m16subdf3
#endif // L_m16adddf3
#endif // L_m16fixsfsi
#endif // L_m16fltsisf
#endif // L_m16ltsf2
#endif // L_m16lesf2
#endif // L_m16gesf2
#endif // L_m16gtsf2
#endif // L_m16nesf2
#endif // L_m16eqsf2
#endif // L_m16divsf3
#endif // L_m16mulsf3
#endif // L_m16addsf3
#endif // L_m16subsf3
#endif /* REGISTER_MASK_H */