libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
gen_ia32_regalloc_if.h
1 
9 #ifndef FIRM_BE_IA32_GEN_IA32_REGALLOC_IF_H
10 #define FIRM_BE_IA32_GEN_IA32_REGALLOC_IF_H
11 
12 #include "ia32_nodes_attr.h"
13 #include "bearch.h"
14 
16 enum reg_indices {
17  REG_EFLAGS,
18  REG_ST0,
19  REG_ST1,
20  REG_ST2,
21  REG_ST3,
22  REG_ST4,
23  REG_ST5,
24  REG_ST6,
25  REG_ST7,
26  REG_FP_NOREG,
27  REG_FPCW,
28  REG_EDX,
29  REG_ECX,
30  REG_EAX,
31  REG_EBX,
32  REG_ESI,
33  REG_EDI,
34  REG_EBP,
35  REG_ESP,
36  REG_GP_NOREG,
37  REG_XMM0,
38  REG_XMM1,
39  REG_XMM2,
40  REG_XMM3,
41  REG_XMM4,
42  REG_XMM5,
43  REG_XMM6,
44  REG_XMM7,
45  REG_XMM_NOREG,
46 
47  N_IA32_REGISTERS
48 };
49 
51 enum {
52  REG_FLAGS_EFLAGS,
53 };
54 
55 enum {
56  REG_FP_ST0,
57  REG_FP_ST1,
58  REG_FP_ST2,
59  REG_FP_ST3,
60  REG_FP_ST4,
61  REG_FP_ST5,
62  REG_FP_ST6,
63  REG_FP_ST7,
64  REG_FP_FP_NOREG,
65 };
66 
67 enum {
68  REG_FP_CW_FPCW,
69 };
70 
71 enum {
72  REG_GP_EDX,
73  REG_GP_ECX,
74  REG_GP_EAX,
75  REG_GP_EBX,
76  REG_GP_ESI,
77  REG_GP_EDI,
78  REG_GP_EBP,
79  REG_GP_ESP,
80  REG_GP_GP_NOREG,
81 };
82 
83 enum {
84  REG_XMM_XMM0,
85  REG_XMM_XMM1,
86  REG_XMM_XMM2,
87  REG_XMM_XMM3,
88  REG_XMM_XMM4,
89  REG_XMM_XMM5,
90  REG_XMM_XMM6,
91  REG_XMM_XMM7,
92  REG_XMM_XMM_NOREG,
93 };
94 
95 
97 enum {
98  N_ia32_flags_REGS = 1,
99  N_ia32_fp_REGS = 9,
100  N_ia32_fp_cw_REGS = 1,
101  N_ia32_gp_REGS = 9,
102  N_ia32_xmm_REGS = 9,
103 
104 };
105 
106 enum {
107  CLASS_ia32_flags,
108  CLASS_ia32_fp,
109  CLASS_ia32_fp_cw,
110  CLASS_ia32_gp,
111  CLASS_ia32_xmm,
112  N_IA32_CLASSES = 5
113 };
114 
115 extern const arch_register_req_t ia32_class_reg_req_flags;
116 extern const arch_register_req_t ia32_single_reg_req_flags_eflags;
117 extern const arch_register_req_t ia32_class_reg_req_fp;
118 extern const arch_register_req_t ia32_single_reg_req_fp_st0;
119 extern const arch_register_req_t ia32_single_reg_req_fp_st1;
120 extern const arch_register_req_t ia32_single_reg_req_fp_st2;
121 extern const arch_register_req_t ia32_single_reg_req_fp_st3;
122 extern const arch_register_req_t ia32_single_reg_req_fp_st4;
123 extern const arch_register_req_t ia32_single_reg_req_fp_st5;
124 extern const arch_register_req_t ia32_single_reg_req_fp_st6;
125 extern const arch_register_req_t ia32_single_reg_req_fp_st7;
126 extern const arch_register_req_t ia32_single_reg_req_fp_fp_NOREG;
127 extern const arch_register_req_t ia32_class_reg_req_fp_cw;
128 extern const arch_register_req_t ia32_single_reg_req_fp_cw_fpcw;
129 extern const arch_register_req_t ia32_class_reg_req_gp;
130 extern const arch_register_req_t ia32_single_reg_req_gp_edx;
131 extern const arch_register_req_t ia32_single_reg_req_gp_ecx;
132 extern const arch_register_req_t ia32_single_reg_req_gp_eax;
133 extern const arch_register_req_t ia32_single_reg_req_gp_ebx;
134 extern const arch_register_req_t ia32_single_reg_req_gp_esi;
135 extern const arch_register_req_t ia32_single_reg_req_gp_edi;
136 extern const arch_register_req_t ia32_single_reg_req_gp_ebp;
137 extern const arch_register_req_t ia32_single_reg_req_gp_esp;
138 extern const arch_register_req_t ia32_single_reg_req_gp_gp_NOREG;
139 extern const arch_register_req_t ia32_class_reg_req_xmm;
140 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm0;
141 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm1;
142 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm2;
143 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm3;
144 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm4;
145 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm5;
146 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm6;
147 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm7;
148 extern const arch_register_req_t ia32_single_reg_req_xmm_xmm_NOREG;
149 
150 
151 extern const arch_register_t ia32_registers[N_IA32_REGISTERS];
152 
153 extern arch_register_class_t ia32_reg_classes[N_IA32_CLASSES];
154 
155 void ia32_register_init(void);
156 
157 #endif