libFirm
gen_amd64_regalloc_if.c
1 
11 #include "gen_amd64_regalloc_if.h"
12 
13 #include "amd64_bearch_t.h"
14 
15 const arch_register_req_t amd64_class_reg_req_flags = {
16  .cls = &amd64_reg_classes[CLASS_amd64_flags],
17  .width = 1,
18 };
19 static const unsigned amd64_limited_flags_eflags[] = { (1U << REG_FLAGS_EFLAGS) };
20 const arch_register_req_t amd64_single_reg_req_flags_eflags = {
21  .cls = &amd64_reg_classes[CLASS_amd64_flags],
22  .limited = amd64_limited_flags_eflags,
23  .width = 1,
24 };
25 const arch_register_req_t amd64_class_reg_req_gp = {
26  .cls = &amd64_reg_classes[CLASS_amd64_gp],
27  .width = 1,
28 };
29 static const unsigned amd64_limited_gp_rax[] = { (1U << REG_GP_RAX) };
30 const arch_register_req_t amd64_single_reg_req_gp_rax = {
31  .cls = &amd64_reg_classes[CLASS_amd64_gp],
32  .limited = amd64_limited_gp_rax,
33  .width = 1,
34 };
35 static const unsigned amd64_limited_gp_rcx[] = { (1U << REG_GP_RCX) };
36 const arch_register_req_t amd64_single_reg_req_gp_rcx = {
37  .cls = &amd64_reg_classes[CLASS_amd64_gp],
38  .limited = amd64_limited_gp_rcx,
39  .width = 1,
40 };
41 static const unsigned amd64_limited_gp_rdx[] = { (1U << REG_GP_RDX) };
42 const arch_register_req_t amd64_single_reg_req_gp_rdx = {
43  .cls = &amd64_reg_classes[CLASS_amd64_gp],
44  .limited = amd64_limited_gp_rdx,
45  .width = 1,
46 };
47 static const unsigned amd64_limited_gp_rsi[] = { (1U << REG_GP_RSI) };
48 const arch_register_req_t amd64_single_reg_req_gp_rsi = {
49  .cls = &amd64_reg_classes[CLASS_amd64_gp],
50  .limited = amd64_limited_gp_rsi,
51  .width = 1,
52 };
53 static const unsigned amd64_limited_gp_rdi[] = { (1U << REG_GP_RDI) };
54 const arch_register_req_t amd64_single_reg_req_gp_rdi = {
55  .cls = &amd64_reg_classes[CLASS_amd64_gp],
56  .limited = amd64_limited_gp_rdi,
57  .width = 1,
58 };
59 static const unsigned amd64_limited_gp_rbx[] = { (1U << REG_GP_RBX) };
60 const arch_register_req_t amd64_single_reg_req_gp_rbx = {
61  .cls = &amd64_reg_classes[CLASS_amd64_gp],
62  .limited = amd64_limited_gp_rbx,
63  .width = 1,
64 };
65 static const unsigned amd64_limited_gp_rbp[] = { (1U << REG_GP_RBP) };
66 const arch_register_req_t amd64_single_reg_req_gp_rbp = {
67  .cls = &amd64_reg_classes[CLASS_amd64_gp],
68  .limited = amd64_limited_gp_rbp,
69  .width = 1,
70 };
71 static const unsigned amd64_limited_gp_rsp[] = { (1U << REG_GP_RSP) };
72 const arch_register_req_t amd64_single_reg_req_gp_rsp = {
73  .cls = &amd64_reg_classes[CLASS_amd64_gp],
74  .limited = amd64_limited_gp_rsp,
75  .width = 1,
76 };
77 static const unsigned amd64_limited_gp_r8[] = { (1U << REG_GP_R8) };
78 const arch_register_req_t amd64_single_reg_req_gp_r8 = {
79  .cls = &amd64_reg_classes[CLASS_amd64_gp],
80  .limited = amd64_limited_gp_r8,
81  .width = 1,
82 };
83 static const unsigned amd64_limited_gp_r9[] = { (1U << REG_GP_R9) };
84 const arch_register_req_t amd64_single_reg_req_gp_r9 = {
85  .cls = &amd64_reg_classes[CLASS_amd64_gp],
86  .limited = amd64_limited_gp_r9,
87  .width = 1,
88 };
89 static const unsigned amd64_limited_gp_r10[] = { (1U << REG_GP_R10) };
90 const arch_register_req_t amd64_single_reg_req_gp_r10 = {
91  .cls = &amd64_reg_classes[CLASS_amd64_gp],
92  .limited = amd64_limited_gp_r10,
93  .width = 1,
94 };
95 static const unsigned amd64_limited_gp_r11[] = { (1U << REG_GP_R11) };
96 const arch_register_req_t amd64_single_reg_req_gp_r11 = {
97  .cls = &amd64_reg_classes[CLASS_amd64_gp],
98  .limited = amd64_limited_gp_r11,
99  .width = 1,
100 };
101 static const unsigned amd64_limited_gp_r12[] = { (1U << REG_GP_R12) };
102 const arch_register_req_t amd64_single_reg_req_gp_r12 = {
103  .cls = &amd64_reg_classes[CLASS_amd64_gp],
104  .limited = amd64_limited_gp_r12,
105  .width = 1,
106 };
107 static const unsigned amd64_limited_gp_r13[] = { (1U << REG_GP_R13) };
108 const arch_register_req_t amd64_single_reg_req_gp_r13 = {
109  .cls = &amd64_reg_classes[CLASS_amd64_gp],
110  .limited = amd64_limited_gp_r13,
111  .width = 1,
112 };
113 static const unsigned amd64_limited_gp_r14[] = { (1U << REG_GP_R14) };
114 const arch_register_req_t amd64_single_reg_req_gp_r14 = {
115  .cls = &amd64_reg_classes[CLASS_amd64_gp],
116  .limited = amd64_limited_gp_r14,
117  .width = 1,
118 };
119 static const unsigned amd64_limited_gp_r15[] = { (1U << REG_GP_R15) };
120 const arch_register_req_t amd64_single_reg_req_gp_r15 = {
121  .cls = &amd64_reg_classes[CLASS_amd64_gp],
122  .limited = amd64_limited_gp_r15,
123  .width = 1,
124 };
125 const arch_register_req_t amd64_class_reg_req_x87 = {
126  .cls = &amd64_reg_classes[CLASS_amd64_x87],
127  .width = 1,
128 };
129 static const unsigned amd64_limited_x87_st0[] = { (1U << REG_X87_ST0) };
130 const arch_register_req_t amd64_single_reg_req_x87_st0 = {
131  .cls = &amd64_reg_classes[CLASS_amd64_x87],
132  .limited = amd64_limited_x87_st0,
133  .width = 1,
134 };
135 static const unsigned amd64_limited_x87_st1[] = { (1U << REG_X87_ST1) };
136 const arch_register_req_t amd64_single_reg_req_x87_st1 = {
137  .cls = &amd64_reg_classes[CLASS_amd64_x87],
138  .limited = amd64_limited_x87_st1,
139  .width = 1,
140 };
141 static const unsigned amd64_limited_x87_st2[] = { (1U << REG_X87_ST2) };
142 const arch_register_req_t amd64_single_reg_req_x87_st2 = {
143  .cls = &amd64_reg_classes[CLASS_amd64_x87],
144  .limited = amd64_limited_x87_st2,
145  .width = 1,
146 };
147 static const unsigned amd64_limited_x87_st3[] = { (1U << REG_X87_ST3) };
148 const arch_register_req_t amd64_single_reg_req_x87_st3 = {
149  .cls = &amd64_reg_classes[CLASS_amd64_x87],
150  .limited = amd64_limited_x87_st3,
151  .width = 1,
152 };
153 static const unsigned amd64_limited_x87_st4[] = { (1U << REG_X87_ST4) };
154 const arch_register_req_t amd64_single_reg_req_x87_st4 = {
155  .cls = &amd64_reg_classes[CLASS_amd64_x87],
156  .limited = amd64_limited_x87_st4,
157  .width = 1,
158 };
159 static const unsigned amd64_limited_x87_st5[] = { (1U << REG_X87_ST5) };
160 const arch_register_req_t amd64_single_reg_req_x87_st5 = {
161  .cls = &amd64_reg_classes[CLASS_amd64_x87],
162  .limited = amd64_limited_x87_st5,
163  .width = 1,
164 };
165 static const unsigned amd64_limited_x87_st6[] = { (1U << REG_X87_ST6) };
166 const arch_register_req_t amd64_single_reg_req_x87_st6 = {
167  .cls = &amd64_reg_classes[CLASS_amd64_x87],
168  .limited = amd64_limited_x87_st6,
169  .width = 1,
170 };
171 static const unsigned amd64_limited_x87_st7[] = { (1U << REG_X87_ST7) };
172 const arch_register_req_t amd64_single_reg_req_x87_st7 = {
173  .cls = &amd64_reg_classes[CLASS_amd64_x87],
174  .limited = amd64_limited_x87_st7,
175  .width = 1,
176 };
177 const arch_register_req_t amd64_class_reg_req_xmm = {
178  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
179  .width = 1,
180 };
181 static const unsigned amd64_limited_xmm_xmm0[] = { (1U << REG_XMM_XMM0) };
182 const arch_register_req_t amd64_single_reg_req_xmm_xmm0 = {
183  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
184  .limited = amd64_limited_xmm_xmm0,
185  .width = 1,
186 };
187 static const unsigned amd64_limited_xmm_xmm1[] = { (1U << REG_XMM_XMM1) };
188 const arch_register_req_t amd64_single_reg_req_xmm_xmm1 = {
189  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
190  .limited = amd64_limited_xmm_xmm1,
191  .width = 1,
192 };
193 static const unsigned amd64_limited_xmm_xmm2[] = { (1U << REG_XMM_XMM2) };
194 const arch_register_req_t amd64_single_reg_req_xmm_xmm2 = {
195  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
196  .limited = amd64_limited_xmm_xmm2,
197  .width = 1,
198 };
199 static const unsigned amd64_limited_xmm_xmm3[] = { (1U << REG_XMM_XMM3) };
200 const arch_register_req_t amd64_single_reg_req_xmm_xmm3 = {
201  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
202  .limited = amd64_limited_xmm_xmm3,
203  .width = 1,
204 };
205 static const unsigned amd64_limited_xmm_xmm4[] = { (1U << REG_XMM_XMM4) };
206 const arch_register_req_t amd64_single_reg_req_xmm_xmm4 = {
207  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
208  .limited = amd64_limited_xmm_xmm4,
209  .width = 1,
210 };
211 static const unsigned amd64_limited_xmm_xmm5[] = { (1U << REG_XMM_XMM5) };
212 const arch_register_req_t amd64_single_reg_req_xmm_xmm5 = {
213  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
214  .limited = amd64_limited_xmm_xmm5,
215  .width = 1,
216 };
217 static const unsigned amd64_limited_xmm_xmm6[] = { (1U << REG_XMM_XMM6) };
218 const arch_register_req_t amd64_single_reg_req_xmm_xmm6 = {
219  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
220  .limited = amd64_limited_xmm_xmm6,
221  .width = 1,
222 };
223 static const unsigned amd64_limited_xmm_xmm7[] = { (1U << REG_XMM_XMM7) };
224 const arch_register_req_t amd64_single_reg_req_xmm_xmm7 = {
225  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
226  .limited = amd64_limited_xmm_xmm7,
227  .width = 1,
228 };
229 static const unsigned amd64_limited_xmm_xmm8[] = { (1U << REG_XMM_XMM8) };
230 const arch_register_req_t amd64_single_reg_req_xmm_xmm8 = {
231  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
232  .limited = amd64_limited_xmm_xmm8,
233  .width = 1,
234 };
235 static const unsigned amd64_limited_xmm_xmm9[] = { (1U << REG_XMM_XMM9) };
236 const arch_register_req_t amd64_single_reg_req_xmm_xmm9 = {
237  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
238  .limited = amd64_limited_xmm_xmm9,
239  .width = 1,
240 };
241 static const unsigned amd64_limited_xmm_xmm10[] = { (1U << REG_XMM_XMM10) };
242 const arch_register_req_t amd64_single_reg_req_xmm_xmm10 = {
243  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
244  .limited = amd64_limited_xmm_xmm10,
245  .width = 1,
246 };
247 static const unsigned amd64_limited_xmm_xmm11[] = { (1U << REG_XMM_XMM11) };
248 const arch_register_req_t amd64_single_reg_req_xmm_xmm11 = {
249  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
250  .limited = amd64_limited_xmm_xmm11,
251  .width = 1,
252 };
253 static const unsigned amd64_limited_xmm_xmm12[] = { (1U << REG_XMM_XMM12) };
254 const arch_register_req_t amd64_single_reg_req_xmm_xmm12 = {
255  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
256  .limited = amd64_limited_xmm_xmm12,
257  .width = 1,
258 };
259 static const unsigned amd64_limited_xmm_xmm13[] = { (1U << REG_XMM_XMM13) };
260 const arch_register_req_t amd64_single_reg_req_xmm_xmm13 = {
261  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
262  .limited = amd64_limited_xmm_xmm13,
263  .width = 1,
264 };
265 static const unsigned amd64_limited_xmm_xmm14[] = { (1U << REG_XMM_XMM14) };
266 const arch_register_req_t amd64_single_reg_req_xmm_xmm14 = {
267  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
268  .limited = amd64_limited_xmm_xmm14,
269  .width = 1,
270 };
271 static const unsigned amd64_limited_xmm_xmm15[] = { (1U << REG_XMM_XMM15) };
272 const arch_register_req_t amd64_single_reg_req_xmm_xmm15 = {
273  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
274  .limited = amd64_limited_xmm_xmm15,
275  .width = 1,
276 };
277 
278 
279 arch_register_class_t amd64_reg_classes[] = {
280  {
281  .name = "amd64_flags",
282  .mode = NULL,
283  .regs = &amd64_registers[REG_EFLAGS],
284  .class_req = &amd64_class_reg_req_flags,
285  .index = CLASS_amd64_flags,
286  .n_regs = 1,
287  .manual_ra = true,
288  },
289  {
290  .name = "amd64_gp",
291  .mode = NULL,
292  .regs = &amd64_registers[REG_RAX],
293  .class_req = &amd64_class_reg_req_gp,
294  .index = CLASS_amd64_gp,
295  .n_regs = 16,
296  .manual_ra = false,
297  },
298  {
299  .name = "amd64_x87",
300  .mode = NULL,
301  .regs = &amd64_registers[REG_ST0],
302  .class_req = &amd64_class_reg_req_x87,
303  .index = CLASS_amd64_x87,
304  .n_regs = 8,
305  .manual_ra = false,
306  },
307  {
308  .name = "amd64_xmm",
309  .mode = NULL,
310  .regs = &amd64_registers[REG_XMM0],
311  .class_req = &amd64_class_reg_req_xmm,
312  .index = CLASS_amd64_xmm,
313  .n_regs = 16,
314  .manual_ra = false,
315  },
316 
317 };
318 
320 const arch_register_t amd64_registers[] = {
321  {
322  .name = "eflags",
323  .cls = &amd64_reg_classes[CLASS_amd64_flags],
324  .single_req = &amd64_single_reg_req_flags_eflags,
325  .index = REG_FLAGS_EFLAGS,
326  .global_index = REG_EFLAGS,
327  .dwarf_number = 49,
328  .encoding = REG_FLAGS_EFLAGS,
329  .is_virtual = false,
330  },
331  {
332  .name = "rax",
333  .cls = &amd64_reg_classes[CLASS_amd64_gp],
334  .single_req = &amd64_single_reg_req_gp_rax,
335  .index = REG_GP_RAX,
336  .global_index = REG_RAX,
337  .dwarf_number = 0,
338  .encoding = REG_GP_RAX,
339  .is_virtual = false,
340  },
341  {
342  .name = "rcx",
343  .cls = &amd64_reg_classes[CLASS_amd64_gp],
344  .single_req = &amd64_single_reg_req_gp_rcx,
345  .index = REG_GP_RCX,
346  .global_index = REG_RCX,
347  .dwarf_number = 2,
348  .encoding = REG_GP_RCX,
349  .is_virtual = false,
350  },
351  {
352  .name = "rdx",
353  .cls = &amd64_reg_classes[CLASS_amd64_gp],
354  .single_req = &amd64_single_reg_req_gp_rdx,
355  .index = REG_GP_RDX,
356  .global_index = REG_RDX,
357  .dwarf_number = 1,
358  .encoding = REG_GP_RDX,
359  .is_virtual = false,
360  },
361  {
362  .name = "rsi",
363  .cls = &amd64_reg_classes[CLASS_amd64_gp],
364  .single_req = &amd64_single_reg_req_gp_rsi,
365  .index = REG_GP_RSI,
366  .global_index = REG_RSI,
367  .dwarf_number = 4,
368  .encoding = REG_GP_RSI,
369  .is_virtual = false,
370  },
371  {
372  .name = "rdi",
373  .cls = &amd64_reg_classes[CLASS_amd64_gp],
374  .single_req = &amd64_single_reg_req_gp_rdi,
375  .index = REG_GP_RDI,
376  .global_index = REG_RDI,
377  .dwarf_number = 5,
378  .encoding = REG_GP_RDI,
379  .is_virtual = false,
380  },
381  {
382  .name = "rbx",
383  .cls = &amd64_reg_classes[CLASS_amd64_gp],
384  .single_req = &amd64_single_reg_req_gp_rbx,
385  .index = REG_GP_RBX,
386  .global_index = REG_RBX,
387  .dwarf_number = 3,
388  .encoding = REG_GP_RBX,
389  .is_virtual = false,
390  },
391  {
392  .name = "rbp",
393  .cls = &amd64_reg_classes[CLASS_amd64_gp],
394  .single_req = &amd64_single_reg_req_gp_rbp,
395  .index = REG_GP_RBP,
396  .global_index = REG_RBP,
397  .dwarf_number = 6,
398  .encoding = REG_GP_RBP,
399  .is_virtual = false,
400  },
401  {
402  .name = "rsp",
403  .cls = &amd64_reg_classes[CLASS_amd64_gp],
404  .single_req = &amd64_single_reg_req_gp_rsp,
405  .index = REG_GP_RSP,
406  .global_index = REG_RSP,
407  .dwarf_number = 7,
408  .encoding = REG_GP_RSP,
409  .is_virtual = false,
410  },
411  {
412  .name = "r8",
413  .cls = &amd64_reg_classes[CLASS_amd64_gp],
414  .single_req = &amd64_single_reg_req_gp_r8,
415  .index = REG_GP_R8,
416  .global_index = REG_R8,
417  .dwarf_number = 8,
418  .encoding = REG_GP_R8,
419  .is_virtual = false,
420  },
421  {
422  .name = "r9",
423  .cls = &amd64_reg_classes[CLASS_amd64_gp],
424  .single_req = &amd64_single_reg_req_gp_r9,
425  .index = REG_GP_R9,
426  .global_index = REG_R9,
427  .dwarf_number = 9,
428  .encoding = REG_GP_R9,
429  .is_virtual = false,
430  },
431  {
432  .name = "r10",
433  .cls = &amd64_reg_classes[CLASS_amd64_gp],
434  .single_req = &amd64_single_reg_req_gp_r10,
435  .index = REG_GP_R10,
436  .global_index = REG_R10,
437  .dwarf_number = 10,
438  .encoding = REG_GP_R10,
439  .is_virtual = false,
440  },
441  {
442  .name = "r11",
443  .cls = &amd64_reg_classes[CLASS_amd64_gp],
444  .single_req = &amd64_single_reg_req_gp_r11,
445  .index = REG_GP_R11,
446  .global_index = REG_R11,
447  .dwarf_number = 11,
448  .encoding = REG_GP_R11,
449  .is_virtual = false,
450  },
451  {
452  .name = "r12",
453  .cls = &amd64_reg_classes[CLASS_amd64_gp],
454  .single_req = &amd64_single_reg_req_gp_r12,
455  .index = REG_GP_R12,
456  .global_index = REG_R12,
457  .dwarf_number = 12,
458  .encoding = REG_GP_R12,
459  .is_virtual = false,
460  },
461  {
462  .name = "r13",
463  .cls = &amd64_reg_classes[CLASS_amd64_gp],
464  .single_req = &amd64_single_reg_req_gp_r13,
465  .index = REG_GP_R13,
466  .global_index = REG_R13,
467  .dwarf_number = 13,
468  .encoding = REG_GP_R13,
469  .is_virtual = false,
470  },
471  {
472  .name = "r14",
473  .cls = &amd64_reg_classes[CLASS_amd64_gp],
474  .single_req = &amd64_single_reg_req_gp_r14,
475  .index = REG_GP_R14,
476  .global_index = REG_R14,
477  .dwarf_number = 14,
478  .encoding = REG_GP_R14,
479  .is_virtual = false,
480  },
481  {
482  .name = "r15",
483  .cls = &amd64_reg_classes[CLASS_amd64_gp],
484  .single_req = &amd64_single_reg_req_gp_r15,
485  .index = REG_GP_R15,
486  .global_index = REG_R15,
487  .dwarf_number = 15,
488  .encoding = REG_GP_R15,
489  .is_virtual = false,
490  },
491  {
492  .name = "st",
493  .cls = &amd64_reg_classes[CLASS_amd64_x87],
494  .single_req = &amd64_single_reg_req_x87_st0,
495  .index = REG_X87_ST0,
496  .global_index = REG_ST0,
497  .dwarf_number = 11,
498  .encoding = 0,
499  .is_virtual = false,
500  },
501  {
502  .name = "st(1)",
503  .cls = &amd64_reg_classes[CLASS_amd64_x87],
504  .single_req = &amd64_single_reg_req_x87_st1,
505  .index = REG_X87_ST1,
506  .global_index = REG_ST1,
507  .dwarf_number = 12,
508  .encoding = 1,
509  .is_virtual = false,
510  },
511  {
512  .name = "st(2)",
513  .cls = &amd64_reg_classes[CLASS_amd64_x87],
514  .single_req = &amd64_single_reg_req_x87_st2,
515  .index = REG_X87_ST2,
516  .global_index = REG_ST2,
517  .dwarf_number = 13,
518  .encoding = 2,
519  .is_virtual = false,
520  },
521  {
522  .name = "st(3)",
523  .cls = &amd64_reg_classes[CLASS_amd64_x87],
524  .single_req = &amd64_single_reg_req_x87_st3,
525  .index = REG_X87_ST3,
526  .global_index = REG_ST3,
527  .dwarf_number = 14,
528  .encoding = 3,
529  .is_virtual = false,
530  },
531  {
532  .name = "st(4)",
533  .cls = &amd64_reg_classes[CLASS_amd64_x87],
534  .single_req = &amd64_single_reg_req_x87_st4,
535  .index = REG_X87_ST4,
536  .global_index = REG_ST4,
537  .dwarf_number = 15,
538  .encoding = 4,
539  .is_virtual = false,
540  },
541  {
542  .name = "st(5)",
543  .cls = &amd64_reg_classes[CLASS_amd64_x87],
544  .single_req = &amd64_single_reg_req_x87_st5,
545  .index = REG_X87_ST5,
546  .global_index = REG_ST5,
547  .dwarf_number = 16,
548  .encoding = 5,
549  .is_virtual = false,
550  },
551  {
552  .name = "st(6)",
553  .cls = &amd64_reg_classes[CLASS_amd64_x87],
554  .single_req = &amd64_single_reg_req_x87_st6,
555  .index = REG_X87_ST6,
556  .global_index = REG_ST6,
557  .dwarf_number = 17,
558  .encoding = 6,
559  .is_virtual = false,
560  },
561  {
562  .name = "st(7)",
563  .cls = &amd64_reg_classes[CLASS_amd64_x87],
564  .single_req = &amd64_single_reg_req_x87_st7,
565  .index = REG_X87_ST7,
566  .global_index = REG_ST7,
567  .dwarf_number = 18,
568  .encoding = 7,
569  .is_virtual = false,
570  },
571  {
572  .name = "xmm0",
573  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
574  .single_req = &amd64_single_reg_req_xmm_xmm0,
575  .index = REG_XMM_XMM0,
576  .global_index = REG_XMM0,
577  .dwarf_number = 17,
578  .encoding = REG_XMM_XMM0,
579  .is_virtual = false,
580  },
581  {
582  .name = "xmm1",
583  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
584  .single_req = &amd64_single_reg_req_xmm_xmm1,
585  .index = REG_XMM_XMM1,
586  .global_index = REG_XMM1,
587  .dwarf_number = 18,
588  .encoding = REG_XMM_XMM1,
589  .is_virtual = false,
590  },
591  {
592  .name = "xmm2",
593  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
594  .single_req = &amd64_single_reg_req_xmm_xmm2,
595  .index = REG_XMM_XMM2,
596  .global_index = REG_XMM2,
597  .dwarf_number = 19,
598  .encoding = REG_XMM_XMM2,
599  .is_virtual = false,
600  },
601  {
602  .name = "xmm3",
603  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
604  .single_req = &amd64_single_reg_req_xmm_xmm3,
605  .index = REG_XMM_XMM3,
606  .global_index = REG_XMM3,
607  .dwarf_number = 20,
608  .encoding = REG_XMM_XMM3,
609  .is_virtual = false,
610  },
611  {
612  .name = "xmm4",
613  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
614  .single_req = &amd64_single_reg_req_xmm_xmm4,
615  .index = REG_XMM_XMM4,
616  .global_index = REG_XMM4,
617  .dwarf_number = 21,
618  .encoding = REG_XMM_XMM4,
619  .is_virtual = false,
620  },
621  {
622  .name = "xmm5",
623  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
624  .single_req = &amd64_single_reg_req_xmm_xmm5,
625  .index = REG_XMM_XMM5,
626  .global_index = REG_XMM5,
627  .dwarf_number = 22,
628  .encoding = REG_XMM_XMM5,
629  .is_virtual = false,
630  },
631  {
632  .name = "xmm6",
633  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
634  .single_req = &amd64_single_reg_req_xmm_xmm6,
635  .index = REG_XMM_XMM6,
636  .global_index = REG_XMM6,
637  .dwarf_number = 23,
638  .encoding = REG_XMM_XMM6,
639  .is_virtual = false,
640  },
641  {
642  .name = "xmm7",
643  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
644  .single_req = &amd64_single_reg_req_xmm_xmm7,
645  .index = REG_XMM_XMM7,
646  .global_index = REG_XMM7,
647  .dwarf_number = 24,
648  .encoding = REG_XMM_XMM7,
649  .is_virtual = false,
650  },
651  {
652  .name = "xmm8",
653  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
654  .single_req = &amd64_single_reg_req_xmm_xmm8,
655  .index = REG_XMM_XMM8,
656  .global_index = REG_XMM8,
657  .dwarf_number = 25,
658  .encoding = REG_XMM_XMM8,
659  .is_virtual = false,
660  },
661  {
662  .name = "xmm9",
663  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
664  .single_req = &amd64_single_reg_req_xmm_xmm9,
665  .index = REG_XMM_XMM9,
666  .global_index = REG_XMM9,
667  .dwarf_number = 26,
668  .encoding = REG_XMM_XMM9,
669  .is_virtual = false,
670  },
671  {
672  .name = "xmm10",
673  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
674  .single_req = &amd64_single_reg_req_xmm_xmm10,
675  .index = REG_XMM_XMM10,
676  .global_index = REG_XMM10,
677  .dwarf_number = 27,
678  .encoding = REG_XMM_XMM10,
679  .is_virtual = false,
680  },
681  {
682  .name = "xmm11",
683  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
684  .single_req = &amd64_single_reg_req_xmm_xmm11,
685  .index = REG_XMM_XMM11,
686  .global_index = REG_XMM11,
687  .dwarf_number = 28,
688  .encoding = REG_XMM_XMM11,
689  .is_virtual = false,
690  },
691  {
692  .name = "xmm12",
693  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
694  .single_req = &amd64_single_reg_req_xmm_xmm12,
695  .index = REG_XMM_XMM12,
696  .global_index = REG_XMM12,
697  .dwarf_number = 29,
698  .encoding = REG_XMM_XMM12,
699  .is_virtual = false,
700  },
701  {
702  .name = "xmm13",
703  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
704  .single_req = &amd64_single_reg_req_xmm_xmm13,
705  .index = REG_XMM_XMM13,
706  .global_index = REG_XMM13,
707  .dwarf_number = 30,
708  .encoding = REG_XMM_XMM13,
709  .is_virtual = false,
710  },
711  {
712  .name = "xmm14",
713  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
714  .single_req = &amd64_single_reg_req_xmm_xmm14,
715  .index = REG_XMM_XMM14,
716  .global_index = REG_XMM14,
717  .dwarf_number = 31,
718  .encoding = REG_XMM_XMM14,
719  .is_virtual = false,
720  },
721  {
722  .name = "xmm15",
723  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
724  .single_req = &amd64_single_reg_req_xmm_xmm15,
725  .index = REG_XMM_XMM15,
726  .global_index = REG_XMM15,
727  .dwarf_number = 32,
728  .encoding = REG_XMM_XMM15,
729  .is_virtual = false,
730  },
731 
732 };
733 
737 void amd64_register_init(void)
738 {
739  amd64_reg_classes[CLASS_amd64_flags].mode = mode_Iu;
740  amd64_reg_classes[CLASS_amd64_gp].mode = mode_Lu;
741  amd64_reg_classes[CLASS_amd64_x87].mode = x86_mode_E;
742  amd64_reg_classes[CLASS_amd64_xmm].mode = amd64_mode_xmm;
743 
744 }
ir_mode * mode_Lu
uint64
Definition: irmode.h:201
ir_mode * mode_Iu
uint32
Definition: irmode.h:199