11 #include "gen_TEMPLATE_regalloc_if.h"
13 #include "TEMPLATE_bearch_t.h"
15 const arch_register_req_t TEMPLATE_class_reg_req_fp = {
16 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
19 static const unsigned TEMPLATE_limited_fp_f0[] = { (1U << REG_FP_F0) };
20 const arch_register_req_t TEMPLATE_single_reg_req_fp_f0 = {
21 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
22 .limited = TEMPLATE_limited_fp_f0,
25 static const unsigned TEMPLATE_limited_fp_f1[] = { (1U << REG_FP_F1) };
26 const arch_register_req_t TEMPLATE_single_reg_req_fp_f1 = {
27 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
28 .limited = TEMPLATE_limited_fp_f1,
31 static const unsigned TEMPLATE_limited_fp_f2[] = { (1U << REG_FP_F2) };
32 const arch_register_req_t TEMPLATE_single_reg_req_fp_f2 = {
33 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
34 .limited = TEMPLATE_limited_fp_f2,
37 static const unsigned TEMPLATE_limited_fp_f3[] = { (1U << REG_FP_F3) };
38 const arch_register_req_t TEMPLATE_single_reg_req_fp_f3 = {
39 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
40 .limited = TEMPLATE_limited_fp_f3,
43 static const unsigned TEMPLATE_limited_fp_f4[] = { (1U << REG_FP_F4) };
44 const arch_register_req_t TEMPLATE_single_reg_req_fp_f4 = {
45 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
46 .limited = TEMPLATE_limited_fp_f4,
49 static const unsigned TEMPLATE_limited_fp_f5[] = { (1U << REG_FP_F5) };
50 const arch_register_req_t TEMPLATE_single_reg_req_fp_f5 = {
51 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
52 .limited = TEMPLATE_limited_fp_f5,
55 static const unsigned TEMPLATE_limited_fp_f6[] = { (1U << REG_FP_F6) };
56 const arch_register_req_t TEMPLATE_single_reg_req_fp_f6 = {
57 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
58 .limited = TEMPLATE_limited_fp_f6,
61 static const unsigned TEMPLATE_limited_fp_f7[] = { (1U << REG_FP_F7) };
62 const arch_register_req_t TEMPLATE_single_reg_req_fp_f7 = {
63 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
64 .limited = TEMPLATE_limited_fp_f7,
67 static const unsigned TEMPLATE_limited_fp_f8[] = { (1U << REG_FP_F8) };
68 const arch_register_req_t TEMPLATE_single_reg_req_fp_f8 = {
69 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
70 .limited = TEMPLATE_limited_fp_f8,
73 static const unsigned TEMPLATE_limited_fp_f9[] = { (1U << REG_FP_F9) };
74 const arch_register_req_t TEMPLATE_single_reg_req_fp_f9 = {
75 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
76 .limited = TEMPLATE_limited_fp_f9,
79 static const unsigned TEMPLATE_limited_fp_f10[] = { (1U << REG_FP_F10) };
80 const arch_register_req_t TEMPLATE_single_reg_req_fp_f10 = {
81 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
82 .limited = TEMPLATE_limited_fp_f10,
85 static const unsigned TEMPLATE_limited_fp_f11[] = { (1U << REG_FP_F11) };
86 const arch_register_req_t TEMPLATE_single_reg_req_fp_f11 = {
87 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
88 .limited = TEMPLATE_limited_fp_f11,
91 static const unsigned TEMPLATE_limited_fp_f12[] = { (1U << REG_FP_F12) };
92 const arch_register_req_t TEMPLATE_single_reg_req_fp_f12 = {
93 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
94 .limited = TEMPLATE_limited_fp_f12,
97 static const unsigned TEMPLATE_limited_fp_f13[] = { (1U << REG_FP_F13) };
98 const arch_register_req_t TEMPLATE_single_reg_req_fp_f13 = {
99 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
100 .limited = TEMPLATE_limited_fp_f13,
103 static const unsigned TEMPLATE_limited_fp_f14[] = { (1U << REG_FP_F14) };
104 const arch_register_req_t TEMPLATE_single_reg_req_fp_f14 = {
105 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
106 .limited = TEMPLATE_limited_fp_f14,
109 static const unsigned TEMPLATE_limited_fp_f15[] = { (1U << REG_FP_F15) };
110 const arch_register_req_t TEMPLATE_single_reg_req_fp_f15 = {
111 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
112 .limited = TEMPLATE_limited_fp_f15,
115 const arch_register_req_t TEMPLATE_class_reg_req_gp = {
116 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
119 static const unsigned TEMPLATE_limited_gp_r0[] = { (1U << REG_GP_R0) };
120 const arch_register_req_t TEMPLATE_single_reg_req_gp_r0 = {
121 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
122 .limited = TEMPLATE_limited_gp_r0,
125 static const unsigned TEMPLATE_limited_gp_r1[] = { (1U << REG_GP_R1) };
126 const arch_register_req_t TEMPLATE_single_reg_req_gp_r1 = {
127 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
128 .limited = TEMPLATE_limited_gp_r1,
131 static const unsigned TEMPLATE_limited_gp_r2[] = { (1U << REG_GP_R2) };
132 const arch_register_req_t TEMPLATE_single_reg_req_gp_r2 = {
133 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
134 .limited = TEMPLATE_limited_gp_r2,
137 static const unsigned TEMPLATE_limited_gp_r3[] = { (1U << REG_GP_R3) };
138 const arch_register_req_t TEMPLATE_single_reg_req_gp_r3 = {
139 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
140 .limited = TEMPLATE_limited_gp_r3,
143 static const unsigned TEMPLATE_limited_gp_r4[] = { (1U << REG_GP_R4) };
144 const arch_register_req_t TEMPLATE_single_reg_req_gp_r4 = {
145 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
146 .limited = TEMPLATE_limited_gp_r4,
149 static const unsigned TEMPLATE_limited_gp_r5[] = { (1U << REG_GP_R5) };
150 const arch_register_req_t TEMPLATE_single_reg_req_gp_r5 = {
151 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
152 .limited = TEMPLATE_limited_gp_r5,
155 static const unsigned TEMPLATE_limited_gp_r6[] = { (1U << REG_GP_R6) };
156 const arch_register_req_t TEMPLATE_single_reg_req_gp_r6 = {
157 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
158 .limited = TEMPLATE_limited_gp_r6,
161 static const unsigned TEMPLATE_limited_gp_r7[] = { (1U << REG_GP_R7) };
162 const arch_register_req_t TEMPLATE_single_reg_req_gp_r7 = {
163 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
164 .limited = TEMPLATE_limited_gp_r7,
167 static const unsigned TEMPLATE_limited_gp_r8[] = { (1U << REG_GP_R8) };
168 const arch_register_req_t TEMPLATE_single_reg_req_gp_r8 = {
169 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
170 .limited = TEMPLATE_limited_gp_r8,
173 static const unsigned TEMPLATE_limited_gp_r9[] = { (1U << REG_GP_R9) };
174 const arch_register_req_t TEMPLATE_single_reg_req_gp_r9 = {
175 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
176 .limited = TEMPLATE_limited_gp_r9,
179 static const unsigned TEMPLATE_limited_gp_r10[] = { (1U << REG_GP_R10) };
180 const arch_register_req_t TEMPLATE_single_reg_req_gp_r10 = {
181 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
182 .limited = TEMPLATE_limited_gp_r10,
185 static const unsigned TEMPLATE_limited_gp_r11[] = { (1U << REG_GP_R11) };
186 const arch_register_req_t TEMPLATE_single_reg_req_gp_r11 = {
187 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
188 .limited = TEMPLATE_limited_gp_r11,
191 static const unsigned TEMPLATE_limited_gp_r12[] = { (1U << REG_GP_R12) };
192 const arch_register_req_t TEMPLATE_single_reg_req_gp_r12 = {
193 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
194 .limited = TEMPLATE_limited_gp_r12,
197 static const unsigned TEMPLATE_limited_gp_r13[] = { (1U << REG_GP_R13) };
198 const arch_register_req_t TEMPLATE_single_reg_req_gp_r13 = {
199 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
200 .limited = TEMPLATE_limited_gp_r13,
203 static const unsigned TEMPLATE_limited_gp_sp[] = { (1U << REG_GP_SP) };
204 const arch_register_req_t TEMPLATE_single_reg_req_gp_sp = {
205 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
206 .limited = TEMPLATE_limited_gp_sp,
209 static const unsigned TEMPLATE_limited_gp_bp[] = { (1U << REG_GP_BP) };
210 const arch_register_req_t TEMPLATE_single_reg_req_gp_bp = {
211 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
212 .limited = TEMPLATE_limited_gp_bp,
217 arch_register_class_t TEMPLATE_reg_classes[] = {
219 .name =
"TEMPLATE_fp",
221 .regs = &TEMPLATE_registers[REG_F0],
222 .class_req = &TEMPLATE_class_reg_req_fp,
223 .index = CLASS_TEMPLATE_fp,
227 .name =
"TEMPLATE_gp",
229 .regs = &TEMPLATE_registers[REG_R0],
230 .class_req = &TEMPLATE_class_reg_req_gp,
231 .index = CLASS_TEMPLATE_gp,
238 const arch_register_t TEMPLATE_registers[] = {
241 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
242 .single_req = &TEMPLATE_single_reg_req_fp_f0,
244 .global_index = REG_F0,
246 .encoding = REG_FP_F0,
251 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
252 .single_req = &TEMPLATE_single_reg_req_fp_f1,
254 .global_index = REG_F1,
256 .encoding = REG_FP_F1,
261 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
262 .single_req = &TEMPLATE_single_reg_req_fp_f2,
264 .global_index = REG_F2,
266 .encoding = REG_FP_F2,
271 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
272 .single_req = &TEMPLATE_single_reg_req_fp_f3,
274 .global_index = REG_F3,
276 .encoding = REG_FP_F3,
281 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
282 .single_req = &TEMPLATE_single_reg_req_fp_f4,
284 .global_index = REG_F4,
286 .encoding = REG_FP_F4,
291 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
292 .single_req = &TEMPLATE_single_reg_req_fp_f5,
294 .global_index = REG_F5,
296 .encoding = REG_FP_F5,
301 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
302 .single_req = &TEMPLATE_single_reg_req_fp_f6,
304 .global_index = REG_F6,
306 .encoding = REG_FP_F6,
311 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
312 .single_req = &TEMPLATE_single_reg_req_fp_f7,
314 .global_index = REG_F7,
316 .encoding = REG_FP_F7,
321 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
322 .single_req = &TEMPLATE_single_reg_req_fp_f8,
324 .global_index = REG_F8,
326 .encoding = REG_FP_F8,
331 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
332 .single_req = &TEMPLATE_single_reg_req_fp_f9,
334 .global_index = REG_F9,
336 .encoding = REG_FP_F9,
341 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
342 .single_req = &TEMPLATE_single_reg_req_fp_f10,
344 .global_index = REG_F10,
346 .encoding = REG_FP_F10,
351 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
352 .single_req = &TEMPLATE_single_reg_req_fp_f11,
354 .global_index = REG_F11,
356 .encoding = REG_FP_F11,
361 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
362 .single_req = &TEMPLATE_single_reg_req_fp_f12,
364 .global_index = REG_F12,
366 .encoding = REG_FP_F12,
371 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
372 .single_req = &TEMPLATE_single_reg_req_fp_f13,
374 .global_index = REG_F13,
376 .encoding = REG_FP_F13,
381 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
382 .single_req = &TEMPLATE_single_reg_req_fp_f14,
384 .global_index = REG_F14,
386 .encoding = REG_FP_F14,
391 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
392 .single_req = &TEMPLATE_single_reg_req_fp_f15,
394 .global_index = REG_F15,
396 .encoding = REG_FP_F15,
401 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
402 .single_req = &TEMPLATE_single_reg_req_gp_r0,
404 .global_index = REG_R0,
406 .encoding = REG_GP_R0,
411 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
412 .single_req = &TEMPLATE_single_reg_req_gp_r1,
414 .global_index = REG_R1,
416 .encoding = REG_GP_R1,
421 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
422 .single_req = &TEMPLATE_single_reg_req_gp_r2,
424 .global_index = REG_R2,
426 .encoding = REG_GP_R2,
431 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
432 .single_req = &TEMPLATE_single_reg_req_gp_r3,
434 .global_index = REG_R3,
436 .encoding = REG_GP_R3,
441 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
442 .single_req = &TEMPLATE_single_reg_req_gp_r4,
444 .global_index = REG_R4,
446 .encoding = REG_GP_R4,
451 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
452 .single_req = &TEMPLATE_single_reg_req_gp_r5,
454 .global_index = REG_R5,
456 .encoding = REG_GP_R5,
461 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
462 .single_req = &TEMPLATE_single_reg_req_gp_r6,
464 .global_index = REG_R6,
466 .encoding = REG_GP_R6,
471 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
472 .single_req = &TEMPLATE_single_reg_req_gp_r7,
474 .global_index = REG_R7,
476 .encoding = REG_GP_R7,
481 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
482 .single_req = &TEMPLATE_single_reg_req_gp_r8,
484 .global_index = REG_R8,
486 .encoding = REG_GP_R8,
491 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
492 .single_req = &TEMPLATE_single_reg_req_gp_r9,
494 .global_index = REG_R9,
496 .encoding = REG_GP_R9,
501 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
502 .single_req = &TEMPLATE_single_reg_req_gp_r10,
504 .global_index = REG_R10,
506 .encoding = REG_GP_R10,
511 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
512 .single_req = &TEMPLATE_single_reg_req_gp_r11,
514 .global_index = REG_R11,
516 .encoding = REG_GP_R11,
521 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
522 .single_req = &TEMPLATE_single_reg_req_gp_r12,
524 .global_index = REG_R12,
526 .encoding = REG_GP_R12,
531 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
532 .single_req = &TEMPLATE_single_reg_req_gp_r13,
534 .global_index = REG_R13,
536 .encoding = REG_GP_R13,
541 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
542 .single_req = &TEMPLATE_single_reg_req_gp_sp,
544 .global_index = REG_SP,
546 .encoding = REG_GP_SP,
551 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
552 .single_req = &TEMPLATE_single_reg_req_gp_bp,
554 .global_index = REG_BP,
556 .encoding = REG_GP_BP,
565 void TEMPLATE_register_init(
void)
567 TEMPLATE_reg_classes[CLASS_TEMPLATE_fp].mode =
mode_F;
568 TEMPLATE_reg_classes[CLASS_TEMPLATE_gp].mode =
mode_Iu;
ir_mode * mode_F
ieee754 binary32 float (single precision)