1 /* Unicorn Emulator Engine */
2 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
3 
4 module unicorn.mips;
5 
6 import unicorn.unicorn;
7 
8 extern(C):
9 
10 //> MIPS registers
11 enum uc_mips_reg {
12 	INVALID = 0,
13 	//> General purpose registers
14 	PC,
15 
16 	_0,
17 	_1,
18 	_2,
19 	_3,
20 	_4,
21 	_5,
22 	_6,
23 	_7,
24 	_8,
25 	_9,
26 	_10,
27 	_11,
28 	_12,
29 	_13,
30 	_14,
31 	_15,
32 	_16,
33 	_17,
34 	_18,
35 	_19,
36 	_20,
37 	_21,
38 	_22,
39 	_23,
40 	_24,
41 	_25,
42 	_26,
43 	_27,
44 	_28,
45 	_29,
46 	_30,
47 	_31,
48 
49 	//> DSP registers
50 	DSPCCOND,
51 	DSPCARRY,
52 	DSPEFI,
53 	DSPOUTFLAG,
54 	DSPOUTFLAG16_19,
55 	DSPOUTFLAG20,
56 	DSPOUTFLAG21,
57 	DSPOUTFLAG22,
58 	DSPOUTFLAG23,
59 	DSPPOS,
60 	DSPSCOUNT,
61 
62 	//> ACC registers
63 	AC0,
64 	AC1,
65 	AC2,
66 	AC3,
67 
68 	//> COP registers
69 	CC0,
70 	CC1,
71 	CC2,
72 	CC3,
73 	CC4,
74 	CC5,
75 	CC6,
76 	CC7,
77 
78 	//> FPU registers
79 	F0,
80 	F1,
81 	F2,
82 	F3,
83 	F4,
84 	F5,
85 	F6,
86 	F7,
87 	F8,
88 	F9,
89 	F10,
90 	F11,
91 	F12,
92 	F13,
93 	F14,
94 	F15,
95 	F16,
96 	F17,
97 	F18,
98 	F19,
99 	F20,
100 	F21,
101 	F22,
102 	F23,
103 	F24,
104 	F25,
105 	F26,
106 	F27,
107 	F28,
108 	F29,
109 	F30,
110 	F31,
111 
112 	FCC0,
113 	FCC1,
114 	FCC2,
115 	FCC3,
116 	FCC4,
117 	FCC5,
118 	FCC6,
119 	FCC7,
120 
121 	//> AFPR128
122 	W0,
123 	W1,
124 	W2,
125 	W3,
126 	W4,
127 	W5,
128 	W6,
129 	W7,
130 	W8,
131 	W9,
132 	W10,
133 	W11,
134 	W12,
135 	W13,
136 	W14,
137 	W15,
138 	W16,
139 	W17,
140 	W18,
141 	W19,
142 	W20,
143 	W21,
144 	W22,
145 	W23,
146 	W24,
147 	W25,
148 	W26,
149 	W27,
150 	W28,
151 	W29,
152 	W30,
153 	W31,
154 
155 	HI,
156 	LO,
157 
158 	P0,
159 	P1,
160 	P2,
161 
162 	MPL0,
163 	MPL1,
164 	MPL2,
165 
166 	ENDING,	// <-- mark the end of the list or registers
167 
168 	// alias registers
169 	ZERO = _0,
170 	AT = _1,
171 	V0 = _2,
172 	V1 = _3,
173 	A0 = _4,
174 	A1 = _5,
175 	A2 = _6,
176 	A3 = _7,
177 	T0 = _8,
178 	T1 = _9,
179 	T2 = _10,
180 	T3 = _11,
181 	T4 = _12,
182 	T5 = _13,
183 	T6 = _14,
184 	T7 = _15,
185 	S0 = _16,
186 	S1 = _17,
187 	S2 = _18,
188 	S3 = _19,
189 	S4 = _20,
190 	S5 = _21,
191 	S6 = _22,
192 	S7 = _23,
193 	T8 = _24,
194 	T9 = _25,
195 	K0 = _26,
196 	K1 = _27,
197 	GP = _28,
198 	SP = _29,
199 	FP = _30, S8 = _30,
200 	RA = _31,
201 
202 	HI0 = AC0,
203 	HI1 = AC1,
204 	HI2 = AC2,
205 	HI3 = AC3,
206 
207 	LO0 = HI0,
208 	LO1 = HI1,
209 	LO2 = HI2,
210 	LO3 = HI3,
211 }