11 #include "gen_TEMPLATE_regalloc_if.h"
12 #include "bearch_TEMPLATE_t.h"
14 const arch_register_req_t TEMPLATE_class_reg_req_fp = {
15 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
18 static const unsigned TEMPLATE_limited_fp_f0[] = { (1U << REG_FP_F0) };
19 const arch_register_req_t TEMPLATE_single_reg_req_fp_f0 = {
20 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
21 .limited = TEMPLATE_limited_fp_f0,
24 static const unsigned TEMPLATE_limited_fp_f1[] = { (1U << REG_FP_F1) };
25 const arch_register_req_t TEMPLATE_single_reg_req_fp_f1 = {
26 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
27 .limited = TEMPLATE_limited_fp_f1,
30 static const unsigned TEMPLATE_limited_fp_f2[] = { (1U << REG_FP_F2) };
31 const arch_register_req_t TEMPLATE_single_reg_req_fp_f2 = {
32 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
33 .limited = TEMPLATE_limited_fp_f2,
36 static const unsigned TEMPLATE_limited_fp_f3[] = { (1U << REG_FP_F3) };
37 const arch_register_req_t TEMPLATE_single_reg_req_fp_f3 = {
38 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
39 .limited = TEMPLATE_limited_fp_f3,
42 static const unsigned TEMPLATE_limited_fp_f4[] = { (1U << REG_FP_F4) };
43 const arch_register_req_t TEMPLATE_single_reg_req_fp_f4 = {
44 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
45 .limited = TEMPLATE_limited_fp_f4,
48 static const unsigned TEMPLATE_limited_fp_f5[] = { (1U << REG_FP_F5) };
49 const arch_register_req_t TEMPLATE_single_reg_req_fp_f5 = {
50 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
51 .limited = TEMPLATE_limited_fp_f5,
54 static const unsigned TEMPLATE_limited_fp_f6[] = { (1U << REG_FP_F6) };
55 const arch_register_req_t TEMPLATE_single_reg_req_fp_f6 = {
56 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
57 .limited = TEMPLATE_limited_fp_f6,
60 static const unsigned TEMPLATE_limited_fp_f7[] = { (1U << REG_FP_F7) };
61 const arch_register_req_t TEMPLATE_single_reg_req_fp_f7 = {
62 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
63 .limited = TEMPLATE_limited_fp_f7,
66 static const unsigned TEMPLATE_limited_fp_f8[] = { (1U << REG_FP_F8) };
67 const arch_register_req_t TEMPLATE_single_reg_req_fp_f8 = {
68 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
69 .limited = TEMPLATE_limited_fp_f8,
72 static const unsigned TEMPLATE_limited_fp_f9[] = { (1U << REG_FP_F9) };
73 const arch_register_req_t TEMPLATE_single_reg_req_fp_f9 = {
74 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
75 .limited = TEMPLATE_limited_fp_f9,
78 static const unsigned TEMPLATE_limited_fp_f10[] = { (1U << REG_FP_F10) };
79 const arch_register_req_t TEMPLATE_single_reg_req_fp_f10 = {
80 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
81 .limited = TEMPLATE_limited_fp_f10,
84 static const unsigned TEMPLATE_limited_fp_f11[] = { (1U << REG_FP_F11) };
85 const arch_register_req_t TEMPLATE_single_reg_req_fp_f11 = {
86 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
87 .limited = TEMPLATE_limited_fp_f11,
90 static const unsigned TEMPLATE_limited_fp_f12[] = { (1U << REG_FP_F12) };
91 const arch_register_req_t TEMPLATE_single_reg_req_fp_f12 = {
92 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
93 .limited = TEMPLATE_limited_fp_f12,
96 static const unsigned TEMPLATE_limited_fp_f13[] = { (1U << REG_FP_F13) };
97 const arch_register_req_t TEMPLATE_single_reg_req_fp_f13 = {
98 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
99 .limited = TEMPLATE_limited_fp_f13,
102 static const unsigned TEMPLATE_limited_fp_f14[] = { (1U << REG_FP_F14) };
103 const arch_register_req_t TEMPLATE_single_reg_req_fp_f14 = {
104 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
105 .limited = TEMPLATE_limited_fp_f14,
108 static const unsigned TEMPLATE_limited_fp_f15[] = { (1U << REG_FP_F15) };
109 const arch_register_req_t TEMPLATE_single_reg_req_fp_f15 = {
110 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
111 .limited = TEMPLATE_limited_fp_f15,
114 const arch_register_req_t TEMPLATE_class_reg_req_gp = {
115 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
118 static const unsigned TEMPLATE_limited_gp_r0[] = { (1U << REG_GP_R0) };
119 const arch_register_req_t TEMPLATE_single_reg_req_gp_r0 = {
120 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
121 .limited = TEMPLATE_limited_gp_r0,
124 static const unsigned TEMPLATE_limited_gp_r1[] = { (1U << REG_GP_R1) };
125 const arch_register_req_t TEMPLATE_single_reg_req_gp_r1 = {
126 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
127 .limited = TEMPLATE_limited_gp_r1,
130 static const unsigned TEMPLATE_limited_gp_r2[] = { (1U << REG_GP_R2) };
131 const arch_register_req_t TEMPLATE_single_reg_req_gp_r2 = {
132 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
133 .limited = TEMPLATE_limited_gp_r2,
136 static const unsigned TEMPLATE_limited_gp_r3[] = { (1U << REG_GP_R3) };
137 const arch_register_req_t TEMPLATE_single_reg_req_gp_r3 = {
138 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
139 .limited = TEMPLATE_limited_gp_r3,
142 static const unsigned TEMPLATE_limited_gp_r4[] = { (1U << REG_GP_R4) };
143 const arch_register_req_t TEMPLATE_single_reg_req_gp_r4 = {
144 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
145 .limited = TEMPLATE_limited_gp_r4,
148 static const unsigned TEMPLATE_limited_gp_r5[] = { (1U << REG_GP_R5) };
149 const arch_register_req_t TEMPLATE_single_reg_req_gp_r5 = {
150 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
151 .limited = TEMPLATE_limited_gp_r5,
154 static const unsigned TEMPLATE_limited_gp_r6[] = { (1U << REG_GP_R6) };
155 const arch_register_req_t TEMPLATE_single_reg_req_gp_r6 = {
156 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
157 .limited = TEMPLATE_limited_gp_r6,
160 static const unsigned TEMPLATE_limited_gp_r7[] = { (1U << REG_GP_R7) };
161 const arch_register_req_t TEMPLATE_single_reg_req_gp_r7 = {
162 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
163 .limited = TEMPLATE_limited_gp_r7,
166 static const unsigned TEMPLATE_limited_gp_r8[] = { (1U << REG_GP_R8) };
167 const arch_register_req_t TEMPLATE_single_reg_req_gp_r8 = {
168 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
169 .limited = TEMPLATE_limited_gp_r8,
172 static const unsigned TEMPLATE_limited_gp_r9[] = { (1U << REG_GP_R9) };
173 const arch_register_req_t TEMPLATE_single_reg_req_gp_r9 = {
174 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
175 .limited = TEMPLATE_limited_gp_r9,
178 static const unsigned TEMPLATE_limited_gp_r10[] = { (1U << REG_GP_R10) };
179 const arch_register_req_t TEMPLATE_single_reg_req_gp_r10 = {
180 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
181 .limited = TEMPLATE_limited_gp_r10,
184 static const unsigned TEMPLATE_limited_gp_r11[] = { (1U << REG_GP_R11) };
185 const arch_register_req_t TEMPLATE_single_reg_req_gp_r11 = {
186 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
187 .limited = TEMPLATE_limited_gp_r11,
190 static const unsigned TEMPLATE_limited_gp_r12[] = { (1U << REG_GP_R12) };
191 const arch_register_req_t TEMPLATE_single_reg_req_gp_r12 = {
192 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
193 .limited = TEMPLATE_limited_gp_r12,
196 static const unsigned TEMPLATE_limited_gp_r13[] = { (1U << REG_GP_R13) };
197 const arch_register_req_t TEMPLATE_single_reg_req_gp_r13 = {
198 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
199 .limited = TEMPLATE_limited_gp_r13,
202 static const unsigned TEMPLATE_limited_gp_sp[] = { (1U << REG_GP_SP) };
203 const arch_register_req_t TEMPLATE_single_reg_req_gp_sp = {
204 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
205 .limited = TEMPLATE_limited_gp_sp,
208 static const unsigned TEMPLATE_limited_gp_bp[] = { (1U << REG_GP_BP) };
209 const arch_register_req_t TEMPLATE_single_reg_req_gp_bp = {
210 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
211 .limited = TEMPLATE_limited_gp_bp,
216 arch_register_class_t TEMPLATE_reg_classes[] = {
218 .name =
"TEMPLATE_fp",
220 .regs = &TEMPLATE_registers[REG_F0],
221 .class_req = &TEMPLATE_class_reg_req_fp,
222 .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,
239 const arch_register_t TEMPLATE_registers[] = {
242 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
243 .single_req = &TEMPLATE_single_reg_req_fp_f0,
245 .global_index = REG_F0,
247 .encoding = REG_FP_F0,
252 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
253 .single_req = &TEMPLATE_single_reg_req_fp_f1,
255 .global_index = REG_F1,
257 .encoding = REG_FP_F1,
262 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
263 .single_req = &TEMPLATE_single_reg_req_fp_f2,
265 .global_index = REG_F2,
267 .encoding = REG_FP_F2,
272 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
273 .single_req = &TEMPLATE_single_reg_req_fp_f3,
275 .global_index = REG_F3,
277 .encoding = REG_FP_F3,
282 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
283 .single_req = &TEMPLATE_single_reg_req_fp_f4,
285 .global_index = REG_F4,
287 .encoding = REG_FP_F4,
292 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
293 .single_req = &TEMPLATE_single_reg_req_fp_f5,
295 .global_index = REG_F5,
297 .encoding = REG_FP_F5,
302 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
303 .single_req = &TEMPLATE_single_reg_req_fp_f6,
305 .global_index = REG_F6,
307 .encoding = REG_FP_F6,
312 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
313 .single_req = &TEMPLATE_single_reg_req_fp_f7,
315 .global_index = REG_F7,
317 .encoding = REG_FP_F7,
322 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
323 .single_req = &TEMPLATE_single_reg_req_fp_f8,
325 .global_index = REG_F8,
327 .encoding = REG_FP_F8,
332 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
333 .single_req = &TEMPLATE_single_reg_req_fp_f9,
335 .global_index = REG_F9,
337 .encoding = REG_FP_F9,
342 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
343 .single_req = &TEMPLATE_single_reg_req_fp_f10,
345 .global_index = REG_F10,
347 .encoding = REG_FP_F10,
352 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
353 .single_req = &TEMPLATE_single_reg_req_fp_f11,
355 .global_index = REG_F11,
357 .encoding = REG_FP_F11,
362 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
363 .single_req = &TEMPLATE_single_reg_req_fp_f12,
365 .global_index = REG_F12,
367 .encoding = REG_FP_F12,
372 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
373 .single_req = &TEMPLATE_single_reg_req_fp_f13,
375 .global_index = REG_F13,
377 .encoding = REG_FP_F13,
382 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
383 .single_req = &TEMPLATE_single_reg_req_fp_f14,
385 .global_index = REG_F14,
387 .encoding = REG_FP_F14,
392 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_fp],
393 .single_req = &TEMPLATE_single_reg_req_fp_f15,
395 .global_index = REG_F15,
397 .encoding = REG_FP_F15,
402 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
403 .single_req = &TEMPLATE_single_reg_req_gp_r0,
405 .global_index = REG_R0,
407 .encoding = REG_GP_R0,
412 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
413 .single_req = &TEMPLATE_single_reg_req_gp_r1,
415 .global_index = REG_R1,
417 .encoding = REG_GP_R1,
422 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
423 .single_req = &TEMPLATE_single_reg_req_gp_r2,
425 .global_index = REG_R2,
427 .encoding = REG_GP_R2,
432 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
433 .single_req = &TEMPLATE_single_reg_req_gp_r3,
435 .global_index = REG_R3,
437 .encoding = REG_GP_R3,
442 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
443 .single_req = &TEMPLATE_single_reg_req_gp_r4,
445 .global_index = REG_R4,
447 .encoding = REG_GP_R4,
452 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
453 .single_req = &TEMPLATE_single_reg_req_gp_r5,
455 .global_index = REG_R5,
457 .encoding = REG_GP_R5,
462 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
463 .single_req = &TEMPLATE_single_reg_req_gp_r6,
465 .global_index = REG_R6,
467 .encoding = REG_GP_R6,
472 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
473 .single_req = &TEMPLATE_single_reg_req_gp_r7,
475 .global_index = REG_R7,
477 .encoding = REG_GP_R7,
482 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
483 .single_req = &TEMPLATE_single_reg_req_gp_r8,
485 .global_index = REG_R8,
487 .encoding = REG_GP_R8,
492 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
493 .single_req = &TEMPLATE_single_reg_req_gp_r9,
495 .global_index = REG_R9,
497 .encoding = REG_GP_R9,
502 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
503 .single_req = &TEMPLATE_single_reg_req_gp_r10,
505 .global_index = REG_R10,
507 .encoding = REG_GP_R10,
512 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
513 .single_req = &TEMPLATE_single_reg_req_gp_r11,
515 .global_index = REG_R11,
517 .encoding = REG_GP_R11,
522 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
523 .single_req = &TEMPLATE_single_reg_req_gp_r12,
525 .global_index = REG_R12,
527 .encoding = REG_GP_R12,
532 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
533 .single_req = &TEMPLATE_single_reg_req_gp_r13,
535 .global_index = REG_R13,
537 .encoding = REG_GP_R13,
542 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
543 .single_req = &TEMPLATE_single_reg_req_gp_sp,
545 .global_index = REG_SP,
547 .encoding = REG_GP_SP,
552 .cls = &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp],
553 .single_req = &TEMPLATE_single_reg_req_gp_bp,
555 .global_index = REG_BP,
557 .encoding = REG_GP_BP,
566 void TEMPLATE_register_init(
void)
568 TEMPLATE_reg_classes[CLASS_TEMPLATE_fp].mode =
mode_F;
569 TEMPLATE_reg_classes[CLASS_TEMPLATE_gp].mode =
mode_Iu;
ir_mode * mode_F
ieee754 binary32 float (single precision)