@@ -32,16 +32,7 @@ along with GCC; see the file COPYING3. If not see
32
32
void
33
33
ix86_jit_target_versions (void )
34
34
{
35
- if (TARGET_64BIT)
36
- {
37
- jit_add_target_info (" target_arch" , " x86_64" );
38
-
39
- // TODO
40
- /* if (TARGET_X32)
41
- jit_add_target_info ("target_arch", "D_X32");*/
42
- }
43
- else
44
- jit_add_target_info (" target_arch" , " x86" );
35
+ // TODO: remove this hook.
45
36
}
46
37
47
38
/* Implement TARGET_JIT_REGISTER_CPU_TARGET_INFO. */
@@ -79,157 +70,11 @@ ix86_jit_register_target_info (void)
79
70
80
71
if (float64_type_node != NULL && TYPE_PRECISION (float64_type_node) == 64 )
81
72
jit_target_add_supported_target_dependent_type (GCC_JIT_TYPE_FLOAT64);
82
-
73
+
83
74
if (float128_type_node != NULL && TYPE_PRECISION (float128_type_node) == 128 )
84
75
jit_target_add_supported_target_dependent_type (GCC_JIT_TYPE_FLOAT128);
85
76
86
- if (TARGET_MMX)
87
- jit_add_target_info (" target_feature" , " mmx" );
88
- if (TARGET_SSE)
89
- jit_add_target_info (" target_feature" , " sse" );
90
- if (TARGET_SSE2)
91
- jit_add_target_info (" target_feature" , " sse2" );
92
- if (TARGET_SSE3)
93
- jit_add_target_info (" target_feature" , " sse3" );
94
- if (TARGET_SSSE3)
95
- jit_add_target_info (" target_feature" , " ssse3" );
96
- if (TARGET_SSE4_1)
97
- jit_add_target_info (" target_feature" , " sse4.1" );
98
- if (TARGET_SSE4_2)
99
- jit_add_target_info (" target_feature" , " sse4.2" );
100
- if (TARGET_AES)
101
- jit_add_target_info (" target_feature" , " aes" );
102
- if (TARGET_SHA)
103
- jit_add_target_info (" target_feature" , " sha" );
104
- if (TARGET_AVX)
105
- jit_add_target_info (" target_feature" , " avx" );
106
- if (TARGET_AVX2)
107
- jit_add_target_info (" target_feature" , " avx2" );
108
- if (TARGET_AVX512F)
109
- jit_add_target_info (" target_feature" , " avx512f" );
110
- // TODO: update the name:
111
- /* if (TARGET_AVX512ER)
112
- jit_add_target_info("target_feature", "avx512er");*/
113
- if (TARGET_AVX512CD)
114
- jit_add_target_info (" target_feature" , " avx512cd" );
115
- // TODO: update the name:
116
- /* if (TARGET_AVX512PF)
117
- jit_add_target_info("target_feature", "avx512pf");*/
118
- if (TARGET_AVX512DQ)
119
- jit_add_target_info (" target_feature" , " avx512dq" );
120
- if (TARGET_AVX512BW)
121
- jit_add_target_info (" target_feature" , " avx512bw" );
122
- if (TARGET_AVX512VL)
123
- jit_add_target_info (" target_feature" , " avx512vl" );
124
- if (TARGET_AVX512VBMI)
125
- jit_add_target_info (" target_feature" , " avx512vbmi" );
126
- if (TARGET_AVX512IFMA)
127
- jit_add_target_info (" target_feature" , " avx512ifma" );
128
- if (TARGET_AVX512VPOPCNTDQ)
129
- jit_add_target_info (" target_feature" , " avx512vpopcntdq" );
130
- if (TARGET_FMA)
131
- jit_add_target_info (" target_feature" , " fma" );
132
- if (TARGET_RTM)
133
- jit_add_target_info (" target_feature" , " rtm" );
134
- if (TARGET_SSE4A)
135
- jit_add_target_info (" target_feature" , " sse4a" );
136
- if (TARGET_BMI) {
137
- jit_add_target_info (" target_feature" , " bmi1" );
138
- jit_add_target_info (" target_feature" , " bmi" );
139
- }
140
- if (TARGET_BMI2)
141
- jit_add_target_info (" target_feature" , " bmi2" );
142
- if (TARGET_LZCNT)
143
- jit_add_target_info (" target_feature" , " lzcnt" );
144
- if (TARGET_TBM)
145
- jit_add_target_info (" target_feature" , " tbm" );
146
- if (TARGET_POPCNT)
147
- jit_add_target_info (" target_feature" , " popcnt" );
148
- if (TARGET_RDRND) {
149
- jit_add_target_info (" target_feature" , " rdrand" );
150
- jit_add_target_info (" target_feature" , " rdrnd" );
151
- }
152
- if (TARGET_F16C)
153
- jit_add_target_info (" target_feature" , " f16c" );
154
- if (TARGET_RDSEED)
155
- jit_add_target_info (" target_feature" , " rdseed" );
156
- if (TARGET_ADX)
157
- jit_add_target_info (" target_feature" , " adx" );
158
- if (TARGET_FXSR)
159
- jit_add_target_info (" target_feature" , " fxsr" );
160
- if (TARGET_XSAVE)
161
- jit_add_target_info (" target_feature" , " xsave" );
162
- if (TARGET_XSAVEOPT)
163
- jit_add_target_info (" target_feature" , " xsaveopt" );
164
- if (TARGET_XSAVEC)
165
- jit_add_target_info (" target_feature" , " xsavec" );
166
- if (TARGET_XSAVES)
167
- jit_add_target_info (" target_feature" , " xsaves" );
168
- if (TARGET_VPCLMULQDQ) {
169
- jit_add_target_info (" target_feature" , " pclmulqdq" );
170
- jit_add_target_info (" target_feature" , " vpclmulqdq" );
171
- }
172
- if (TARGET_CMPXCHG16B)
173
- jit_add_target_info (" target_feature" , " cmpxchg16b" );
174
- if (TARGET_MOVBE)
175
- jit_add_target_info (" target_feature" , " movbe" );
176
- if (TARGET_AVX512VBMI2)
177
- jit_add_target_info (" target_feature" , " avx512vbmi2" );
178
- if (TARGET_PKU)
179
- jit_add_target_info (" target_feature" , " pku" );
180
- if (TARGET_AVX512VNNI)
181
- jit_add_target_info (" target_feature" , " avx512vnni" );
182
- if (TARGET_AVX512BF16)
183
- jit_add_target_info (" target_feature" , " avx512bf16" );
184
- if (TARGET_AVX512BITALG)
185
- jit_add_target_info (" target_feature" , " avx512bitalg" );
186
- if (TARGET_AVX512VP2INTERSECT)
187
- jit_add_target_info (" target_feature" , " avx512vp2intersect" );
188
- if (TARGET_PCLMUL)
189
- jit_add_target_info (" target_feature" , " pclmul" );
190
- if (TARGET_GFNI)
191
- jit_add_target_info (" target_feature" , " gfni" );
192
- if (TARGET_FMA4)
193
- jit_add_target_info (" target_feature" , " fma4" );
194
- if (TARGET_XOP)
195
- jit_add_target_info (" target_feature" , " xop" );
196
- if (TARGET_AVXIFMA)
197
- jit_add_target_info (" target_feature" , " avxifma" );
198
- if (TARGET_AVXNECONVERT)
199
- jit_add_target_info (" target_feature" , " avxneconvert" );
200
- if (TARGET_AVXVNNIINT8)
201
- jit_add_target_info (" target_feature" , " avxvnniint8" );
202
- if (TARGET_AVXVNNIINT16)
203
- jit_add_target_info (" target_feature" , " avxvnniint16" );
204
-
205
- // this is only enabled by choice in llvm, never by default - TODO determine if gcc enables it
206
- // jit_add_target_info("target_feature", "sse-unaligned-mem");
207
-
208
- if (TARGET_VAES)
209
- jit_add_target_info (" target_feature" , " vaes" );
210
- if (TARGET_LWP)
211
- jit_add_target_info (" target_feature" , " lwp" );
212
- if (TARGET_FSGSBASE)
213
- jit_add_target_info (" target_feature" , " fsgsbase" );
214
- if (TARGET_SHSTK)
215
- jit_add_target_info (" target_feature" , " shstk" );
216
- if (TARGET_PRFCHW)
217
- jit_add_target_info (" target_feature" , " prfchw" );
218
- if (TARGET_SAHF) // would this be better as TARGET_USE_SAHF?
219
- jit_add_target_info (" target_feature" , " sahf" );
220
- if (TARGET_MWAITX)
221
- jit_add_target_info (" target_feature" , " mwaitx" );
222
- if (TARGET_CLZERO)
223
- jit_add_target_info (" target_feature" , " clzero" );
224
- if (TARGET_CLDEMOTE)
225
- jit_add_target_info (" target_feature" , " cldemote" );
226
- if (TARGET_PTWRITE)
227
- jit_add_target_info (" target_feature" , " ptwrite" );
228
- bool hasERMSB = ix86_arch == PROCESSOR_HASWELL || ix86_arch == PROCESSOR_SKYLAKE
229
- || ix86_arch == PROCESSOR_SKYLAKE_AVX512 || ix86_arch == PROCESSOR_CANNONLAKE
230
- || ix86_arch == PROCESSOR_ICELAKE_CLIENT || ix86_arch == PROCESSOR_ICELAKE_SERVER
231
- || ix86_arch == PROCESSOR_CASCADELAKE || ix86_arch == PROCESSOR_TIGERLAKE
232
- || ix86_arch == PROCESSOR_COOPERLAKE;
233
- if (hasERMSB)
234
- jit_add_target_info (" target_feature" , " ermsbd" );
77
+ #define ADD_TARGET_INFO jit_add_target_info
78
+ #include " i386-rust-and-jit.inc"
79
+ #undef ADD_TARGET_INFO
235
80
}
0 commit comments