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