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,
228 .name =
"TEMPLATE_gp",
230 .regs = &TEMPLATE_registers[REG_R0],
231 .class_req = &TEMPLATE_class_reg_req_gp,
232 .index = CLASS_TEMPLATE_gp,
240 const arch_register_t TEMPLATE_registers[] = {
243 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
244 .single_req = &TEMPLATE_single_reg_req_fp_f0,
246 .global_index = REG_F0,
248 .encoding = REG_FP_F0,
253 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
254 .single_req = &TEMPLATE_single_reg_req_fp_f1,
256 .global_index = REG_F1,
258 .encoding = REG_FP_F1,
263 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
264 .single_req = &TEMPLATE_single_reg_req_fp_f2,
266 .global_index = REG_F2,
268 .encoding = REG_FP_F2,
273 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
274 .single_req = &TEMPLATE_single_reg_req_fp_f3,
276 .global_index = REG_F3,
278 .encoding = REG_FP_F3,
283 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
284 .single_req = &TEMPLATE_single_reg_req_fp_f4,
286 .global_index = REG_F4,
288 .encoding = REG_FP_F4,
293 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
294 .single_req = &TEMPLATE_single_reg_req_fp_f5,
296 .global_index = REG_F5,
298 .encoding = REG_FP_F5,
303 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
304 .single_req = &TEMPLATE_single_reg_req_fp_f6,
306 .global_index = REG_F6,
308 .encoding = REG_FP_F6,
313 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
314 .single_req = &TEMPLATE_single_reg_req_fp_f7,
316 .global_index = REG_F7,
318 .encoding = REG_FP_F7,
323 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
324 .single_req = &TEMPLATE_single_reg_req_fp_f8,
326 .global_index = REG_F8,
328 .encoding = REG_FP_F8,
333 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
334 .single_req = &TEMPLATE_single_reg_req_fp_f9,
336 .global_index = REG_F9,
338 .encoding = REG_FP_F9,
343 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
344 .single_req = &TEMPLATE_single_reg_req_fp_f10,
346 .global_index = REG_F10,
348 .encoding = REG_FP_F10,
353 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
354 .single_req = &TEMPLATE_single_reg_req_fp_f11,
356 .global_index = REG_F11,
358 .encoding = REG_FP_F11,
363 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
364 .single_req = &TEMPLATE_single_reg_req_fp_f12,
366 .global_index = REG_F12,
368 .encoding = REG_FP_F12,
373 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
374 .single_req = &TEMPLATE_single_reg_req_fp_f13,
376 .global_index = REG_F13,
378 .encoding = REG_FP_F13,
383 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
384 .single_req = &TEMPLATE_single_reg_req_fp_f14,
386 .global_index = REG_F14,
388 .encoding = REG_FP_F14,
393 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
394 .single_req = &TEMPLATE_single_reg_req_fp_f15,
396 .global_index = REG_F15,
398 .encoding = REG_FP_F15,
403 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
404 .single_req = &TEMPLATE_single_reg_req_gp_r0,
406 .global_index = REG_R0,
408 .encoding = REG_GP_R0,
413 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
414 .single_req = &TEMPLATE_single_reg_req_gp_r1,
416 .global_index = REG_R1,
418 .encoding = REG_GP_R1,
423 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
424 .single_req = &TEMPLATE_single_reg_req_gp_r2,
426 .global_index = REG_R2,
428 .encoding = REG_GP_R2,
433 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
434 .single_req = &TEMPLATE_single_reg_req_gp_r3,
436 .global_index = REG_R3,
438 .encoding = REG_GP_R3,
443 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
444 .single_req = &TEMPLATE_single_reg_req_gp_r4,
446 .global_index = REG_R4,
448 .encoding = REG_GP_R4,
453 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
454 .single_req = &TEMPLATE_single_reg_req_gp_r5,
456 .global_index = REG_R5,
458 .encoding = REG_GP_R5,
463 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
464 .single_req = &TEMPLATE_single_reg_req_gp_r6,
466 .global_index = REG_R6,
468 .encoding = REG_GP_R6,
473 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
474 .single_req = &TEMPLATE_single_reg_req_gp_r7,
476 .global_index = REG_R7,
478 .encoding = REG_GP_R7,
483 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
484 .single_req = &TEMPLATE_single_reg_req_gp_r8,
486 .global_index = REG_R8,
488 .encoding = REG_GP_R8,
493 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
494 .single_req = &TEMPLATE_single_reg_req_gp_r9,
496 .global_index = REG_R9,
498 .encoding = REG_GP_R9,
503 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
504 .single_req = &TEMPLATE_single_reg_req_gp_r10,
506 .global_index = REG_R10,
508 .encoding = REG_GP_R10,
513 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
514 .single_req = &TEMPLATE_single_reg_req_gp_r11,
516 .global_index = REG_R11,
518 .encoding = REG_GP_R11,
523 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
524 .single_req = &TEMPLATE_single_reg_req_gp_r12,
526 .global_index = REG_R12,
528 .encoding = REG_GP_R12,
533 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
534 .single_req = &TEMPLATE_single_reg_req_gp_r13,
536 .global_index = REG_R13,
538 .encoding = REG_GP_R13,
543 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
544 .single_req = &TEMPLATE_single_reg_req_gp_sp,
546 .global_index = REG_SP,
548 .encoding = REG_GP_SP,
553 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
554 .single_req = &TEMPLATE_single_reg_req_gp_bp,
556 .global_index = REG_BP,
558 .encoding = REG_GP_BP,
567 void TEMPLATE_register_init(
void)
569 TEMPLATE_reg_classes[CLASS_TEMPLATE_fp].mode =
mode_F;
570 TEMPLATE_reg_classes[CLASS_TEMPLATE_gp].mode =
mode_Iu;
ir_mode * mode_F
ieee754 binary32 float (single precision)