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