libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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  },
297  {
298  .name = "amd64_x87",
299  .mode = NULL,
300  .regs = &amd64_registers[REG_ST0],
301  .class_req = &amd64_class_reg_req_x87,
302  .index = CLASS_amd64_x87,
303  .n_regs = 8,
304  .allow_clobber_input = true,
305  },
306  {
307  .name = "amd64_xmm",
308  .mode = NULL,
309  .regs = &amd64_registers[REG_XMM0],
310  .class_req = &amd64_class_reg_req_xmm,
311  .index = CLASS_amd64_xmm,
312  .n_regs = 16,
313  },
314 
315 };
316 
318 const arch_register_t amd64_registers[] = {
319  {
320  .name = "eflags",
321  .cls = &amd64_reg_classes[CLASS_amd64_flags],
322  .single_req = &amd64_single_reg_req_flags_eflags,
323  .index = REG_FLAGS_EFLAGS,
324  .global_index = REG_EFLAGS,
325  .dwarf_number = 49,
326  .encoding = REG_FLAGS_EFLAGS,
327  .is_virtual = false,
328  },
329  {
330  .name = "rax",
331  .cls = &amd64_reg_classes[CLASS_amd64_gp],
332  .single_req = &amd64_single_reg_req_gp_rax,
333  .index = REG_GP_RAX,
334  .global_index = REG_RAX,
335  .dwarf_number = 0,
336  .encoding = REG_GP_RAX,
337  .is_virtual = false,
338  },
339  {
340  .name = "rcx",
341  .cls = &amd64_reg_classes[CLASS_amd64_gp],
342  .single_req = &amd64_single_reg_req_gp_rcx,
343  .index = REG_GP_RCX,
344  .global_index = REG_RCX,
345  .dwarf_number = 2,
346  .encoding = REG_GP_RCX,
347  .is_virtual = false,
348  },
349  {
350  .name = "rdx",
351  .cls = &amd64_reg_classes[CLASS_amd64_gp],
352  .single_req = &amd64_single_reg_req_gp_rdx,
353  .index = REG_GP_RDX,
354  .global_index = REG_RDX,
355  .dwarf_number = 1,
356  .encoding = REG_GP_RDX,
357  .is_virtual = false,
358  },
359  {
360  .name = "rsi",
361  .cls = &amd64_reg_classes[CLASS_amd64_gp],
362  .single_req = &amd64_single_reg_req_gp_rsi,
363  .index = REG_GP_RSI,
364  .global_index = REG_RSI,
365  .dwarf_number = 4,
366  .encoding = REG_GP_RSI,
367  .is_virtual = false,
368  },
369  {
370  .name = "rdi",
371  .cls = &amd64_reg_classes[CLASS_amd64_gp],
372  .single_req = &amd64_single_reg_req_gp_rdi,
373  .index = REG_GP_RDI,
374  .global_index = REG_RDI,
375  .dwarf_number = 5,
376  .encoding = REG_GP_RDI,
377  .is_virtual = false,
378  },
379  {
380  .name = "rbx",
381  .cls = &amd64_reg_classes[CLASS_amd64_gp],
382  .single_req = &amd64_single_reg_req_gp_rbx,
383  .index = REG_GP_RBX,
384  .global_index = REG_RBX,
385  .dwarf_number = 3,
386  .encoding = REG_GP_RBX,
387  .is_virtual = false,
388  },
389  {
390  .name = "rbp",
391  .cls = &amd64_reg_classes[CLASS_amd64_gp],
392  .single_req = &amd64_single_reg_req_gp_rbp,
393  .index = REG_GP_RBP,
394  .global_index = REG_RBP,
395  .dwarf_number = 6,
396  .encoding = REG_GP_RBP,
397  .is_virtual = false,
398  },
399  {
400  .name = "rsp",
401  .cls = &amd64_reg_classes[CLASS_amd64_gp],
402  .single_req = &amd64_single_reg_req_gp_rsp,
403  .index = REG_GP_RSP,
404  .global_index = REG_RSP,
405  .dwarf_number = 7,
406  .encoding = REG_GP_RSP,
407  .is_virtual = false,
408  },
409  {
410  .name = "r8",
411  .cls = &amd64_reg_classes[CLASS_amd64_gp],
412  .single_req = &amd64_single_reg_req_gp_r8,
413  .index = REG_GP_R8,
414  .global_index = REG_R8,
415  .dwarf_number = 8,
416  .encoding = REG_GP_R8,
417  .is_virtual = false,
418  },
419  {
420  .name = "r9",
421  .cls = &amd64_reg_classes[CLASS_amd64_gp],
422  .single_req = &amd64_single_reg_req_gp_r9,
423  .index = REG_GP_R9,
424  .global_index = REG_R9,
425  .dwarf_number = 9,
426  .encoding = REG_GP_R9,
427  .is_virtual = false,
428  },
429  {
430  .name = "r10",
431  .cls = &amd64_reg_classes[CLASS_amd64_gp],
432  .single_req = &amd64_single_reg_req_gp_r10,
433  .index = REG_GP_R10,
434  .global_index = REG_R10,
435  .dwarf_number = 10,
436  .encoding = REG_GP_R10,
437  .is_virtual = false,
438  },
439  {
440  .name = "r11",
441  .cls = &amd64_reg_classes[CLASS_amd64_gp],
442  .single_req = &amd64_single_reg_req_gp_r11,
443  .index = REG_GP_R11,
444  .global_index = REG_R11,
445  .dwarf_number = 11,
446  .encoding = REG_GP_R11,
447  .is_virtual = false,
448  },
449  {
450  .name = "r12",
451  .cls = &amd64_reg_classes[CLASS_amd64_gp],
452  .single_req = &amd64_single_reg_req_gp_r12,
453  .index = REG_GP_R12,
454  .global_index = REG_R12,
455  .dwarf_number = 12,
456  .encoding = REG_GP_R12,
457  .is_virtual = false,
458  },
459  {
460  .name = "r13",
461  .cls = &amd64_reg_classes[CLASS_amd64_gp],
462  .single_req = &amd64_single_reg_req_gp_r13,
463  .index = REG_GP_R13,
464  .global_index = REG_R13,
465  .dwarf_number = 13,
466  .encoding = REG_GP_R13,
467  .is_virtual = false,
468  },
469  {
470  .name = "r14",
471  .cls = &amd64_reg_classes[CLASS_amd64_gp],
472  .single_req = &amd64_single_reg_req_gp_r14,
473  .index = REG_GP_R14,
474  .global_index = REG_R14,
475  .dwarf_number = 14,
476  .encoding = REG_GP_R14,
477  .is_virtual = false,
478  },
479  {
480  .name = "r15",
481  .cls = &amd64_reg_classes[CLASS_amd64_gp],
482  .single_req = &amd64_single_reg_req_gp_r15,
483  .index = REG_GP_R15,
484  .global_index = REG_R15,
485  .dwarf_number = 15,
486  .encoding = REG_GP_R15,
487  .is_virtual = false,
488  },
489  {
490  .name = "st",
491  .cls = &amd64_reg_classes[CLASS_amd64_x87],
492  .single_req = &amd64_single_reg_req_x87_st0,
493  .index = REG_X87_ST0,
494  .global_index = REG_ST0,
495  .dwarf_number = 11,
496  .encoding = 0,
497  .is_virtual = false,
498  },
499  {
500  .name = "st(1)",
501  .cls = &amd64_reg_classes[CLASS_amd64_x87],
502  .single_req = &amd64_single_reg_req_x87_st1,
503  .index = REG_X87_ST1,
504  .global_index = REG_ST1,
505  .dwarf_number = 12,
506  .encoding = 1,
507  .is_virtual = false,
508  },
509  {
510  .name = "st(2)",
511  .cls = &amd64_reg_classes[CLASS_amd64_x87],
512  .single_req = &amd64_single_reg_req_x87_st2,
513  .index = REG_X87_ST2,
514  .global_index = REG_ST2,
515  .dwarf_number = 13,
516  .encoding = 2,
517  .is_virtual = false,
518  },
519  {
520  .name = "st(3)",
521  .cls = &amd64_reg_classes[CLASS_amd64_x87],
522  .single_req = &amd64_single_reg_req_x87_st3,
523  .index = REG_X87_ST3,
524  .global_index = REG_ST3,
525  .dwarf_number = 14,
526  .encoding = 3,
527  .is_virtual = false,
528  },
529  {
530  .name = "st(4)",
531  .cls = &amd64_reg_classes[CLASS_amd64_x87],
532  .single_req = &amd64_single_reg_req_x87_st4,
533  .index = REG_X87_ST4,
534  .global_index = REG_ST4,
535  .dwarf_number = 15,
536  .encoding = 4,
537  .is_virtual = false,
538  },
539  {
540  .name = "st(5)",
541  .cls = &amd64_reg_classes[CLASS_amd64_x87],
542  .single_req = &amd64_single_reg_req_x87_st5,
543  .index = REG_X87_ST5,
544  .global_index = REG_ST5,
545  .dwarf_number = 16,
546  .encoding = 5,
547  .is_virtual = false,
548  },
549  {
550  .name = "st(6)",
551  .cls = &amd64_reg_classes[CLASS_amd64_x87],
552  .single_req = &amd64_single_reg_req_x87_st6,
553  .index = REG_X87_ST6,
554  .global_index = REG_ST6,
555  .dwarf_number = 17,
556  .encoding = 6,
557  .is_virtual = false,
558  },
559  {
560  .name = "st(7)",
561  .cls = &amd64_reg_classes[CLASS_amd64_x87],
562  .single_req = &amd64_single_reg_req_x87_st7,
563  .index = REG_X87_ST7,
564  .global_index = REG_ST7,
565  .dwarf_number = 18,
566  .encoding = 7,
567  .is_virtual = false,
568  },
569  {
570  .name = "xmm0",
571  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
572  .single_req = &amd64_single_reg_req_xmm_xmm0,
573  .index = REG_XMM_XMM0,
574  .global_index = REG_XMM0,
575  .dwarf_number = 17,
576  .encoding = REG_XMM_XMM0,
577  .is_virtual = false,
578  },
579  {
580  .name = "xmm1",
581  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
582  .single_req = &amd64_single_reg_req_xmm_xmm1,
583  .index = REG_XMM_XMM1,
584  .global_index = REG_XMM1,
585  .dwarf_number = 18,
586  .encoding = REG_XMM_XMM1,
587  .is_virtual = false,
588  },
589  {
590  .name = "xmm2",
591  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
592  .single_req = &amd64_single_reg_req_xmm_xmm2,
593  .index = REG_XMM_XMM2,
594  .global_index = REG_XMM2,
595  .dwarf_number = 19,
596  .encoding = REG_XMM_XMM2,
597  .is_virtual = false,
598  },
599  {
600  .name = "xmm3",
601  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
602  .single_req = &amd64_single_reg_req_xmm_xmm3,
603  .index = REG_XMM_XMM3,
604  .global_index = REG_XMM3,
605  .dwarf_number = 20,
606  .encoding = REG_XMM_XMM3,
607  .is_virtual = false,
608  },
609  {
610  .name = "xmm4",
611  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
612  .single_req = &amd64_single_reg_req_xmm_xmm4,
613  .index = REG_XMM_XMM4,
614  .global_index = REG_XMM4,
615  .dwarf_number = 21,
616  .encoding = REG_XMM_XMM4,
617  .is_virtual = false,
618  },
619  {
620  .name = "xmm5",
621  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
622  .single_req = &amd64_single_reg_req_xmm_xmm5,
623  .index = REG_XMM_XMM5,
624  .global_index = REG_XMM5,
625  .dwarf_number = 22,
626  .encoding = REG_XMM_XMM5,
627  .is_virtual = false,
628  },
629  {
630  .name = "xmm6",
631  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
632  .single_req = &amd64_single_reg_req_xmm_xmm6,
633  .index = REG_XMM_XMM6,
634  .global_index = REG_XMM6,
635  .dwarf_number = 23,
636  .encoding = REG_XMM_XMM6,
637  .is_virtual = false,
638  },
639  {
640  .name = "xmm7",
641  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
642  .single_req = &amd64_single_reg_req_xmm_xmm7,
643  .index = REG_XMM_XMM7,
644  .global_index = REG_XMM7,
645  .dwarf_number = 24,
646  .encoding = REG_XMM_XMM7,
647  .is_virtual = false,
648  },
649  {
650  .name = "xmm8",
651  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
652  .single_req = &amd64_single_reg_req_xmm_xmm8,
653  .index = REG_XMM_XMM8,
654  .global_index = REG_XMM8,
655  .dwarf_number = 25,
656  .encoding = REG_XMM_XMM8,
657  .is_virtual = false,
658  },
659  {
660  .name = "xmm9",
661  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
662  .single_req = &amd64_single_reg_req_xmm_xmm9,
663  .index = REG_XMM_XMM9,
664  .global_index = REG_XMM9,
665  .dwarf_number = 26,
666  .encoding = REG_XMM_XMM9,
667  .is_virtual = false,
668  },
669  {
670  .name = "xmm10",
671  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
672  .single_req = &amd64_single_reg_req_xmm_xmm10,
673  .index = REG_XMM_XMM10,
674  .global_index = REG_XMM10,
675  .dwarf_number = 27,
676  .encoding = REG_XMM_XMM10,
677  .is_virtual = false,
678  },
679  {
680  .name = "xmm11",
681  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
682  .single_req = &amd64_single_reg_req_xmm_xmm11,
683  .index = REG_XMM_XMM11,
684  .global_index = REG_XMM11,
685  .dwarf_number = 28,
686  .encoding = REG_XMM_XMM11,
687  .is_virtual = false,
688  },
689  {
690  .name = "xmm12",
691  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
692  .single_req = &amd64_single_reg_req_xmm_xmm12,
693  .index = REG_XMM_XMM12,
694  .global_index = REG_XMM12,
695  .dwarf_number = 29,
696  .encoding = REG_XMM_XMM12,
697  .is_virtual = false,
698  },
699  {
700  .name = "xmm13",
701  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
702  .single_req = &amd64_single_reg_req_xmm_xmm13,
703  .index = REG_XMM_XMM13,
704  .global_index = REG_XMM13,
705  .dwarf_number = 30,
706  .encoding = REG_XMM_XMM13,
707  .is_virtual = false,
708  },
709  {
710  .name = "xmm14",
711  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
712  .single_req = &amd64_single_reg_req_xmm_xmm14,
713  .index = REG_XMM_XMM14,
714  .global_index = REG_XMM14,
715  .dwarf_number = 31,
716  .encoding = REG_XMM_XMM14,
717  .is_virtual = false,
718  },
719  {
720  .name = "xmm15",
721  .cls = &amd64_reg_classes[CLASS_amd64_xmm],
722  .single_req = &amd64_single_reg_req_xmm_xmm15,
723  .index = REG_XMM_XMM15,
724  .global_index = REG_XMM15,
725  .dwarf_number = 32,
726  .encoding = REG_XMM_XMM15,
727  .is_virtual = false,
728  },
729 
730 };
731 
735 void amd64_register_init(void)
736 {
737  amd64_reg_classes[CLASS_amd64_flags].mode = mode_Iu;
738  amd64_reg_classes[CLASS_amd64_gp].mode = mode_Lu;
739  amd64_reg_classes[CLASS_amd64_x87].mode = x86_mode_E;
740  amd64_reg_classes[CLASS_amd64_xmm].mode = amd64_mode_xmm;
741 
742 }
ir_mode * mode_Iu
uint32
Definition: irmode.h:187
ir_mode * mode_Lu
uint64
Definition: irmode.h:189