30enum RuntimeLibcallSignature {
63 i32_func_i32_i32_iPTR,
65 i64_func_i64_i64_iPTR,
73 i64_i64_func_i64_i64_i64_i64,
74 i64_i64_func_i64_i64_i64_i64_iPTR,
75 i64_i64_i64_i64_func_i64_i64_i64_i64,
76 i64_i64_func_i64_i64_i32,
77 i64_i64_func_i64_i64_i64_i64_i64_i64,
79 iPTR_func_iPTR_i32_iPTR,
80 iPTR_func_iPTR_iPTR_iPTR,
83 func_i64_i64_iPTR_iPTR,
85 i32_func_i64_i64_i64_i64,
92struct RuntimeLibcallSignatureTable {
93 std::vector<RuntimeLibcallSignature> Table;
96 RuntimeLibcallSignatureTable() : Table(RTLIB::UNKNOWN_LIBCALL,
unsupported) {
98 Table[RTLIB::SHL_I16] = i16_func_i16_i16;
99 Table[RTLIB::SHL_I32] = i32_func_i32_i32;
100 Table[RTLIB::SHL_I64] = i64_func_i64_i64;
101 Table[RTLIB::SHL_I128] = i64_i64_func_i64_i64_i32;
102 Table[RTLIB::SRL_I16] = i16_func_i16_i16;
103 Table[RTLIB::SRL_I32] = i32_func_i32_i32;
104 Table[RTLIB::SRL_I64] = i64_func_i64_i64;
105 Table[RTLIB::SRL_I128] = i64_i64_func_i64_i64_i32;
106 Table[RTLIB::SRA_I16] = i16_func_i16_i16;
107 Table[RTLIB::SRA_I32] = i32_func_i32_i32;
108 Table[RTLIB::SRA_I64] = i64_func_i64_i64;
109 Table[RTLIB::SRA_I128] = i64_i64_func_i64_i64_i32;
110 Table[RTLIB::MUL_I8] = i8_func_i8_i8;
111 Table[RTLIB::MUL_I16] = i16_func_i16_i16;
112 Table[RTLIB::MUL_I32] = i32_func_i32_i32;
113 Table[RTLIB::MUL_I64] = i64_func_i64_i64;
114 Table[RTLIB::MUL_I128] = i64_i64_func_i64_i64_i64_i64;
115 Table[RTLIB::MULO_I32] = i32_func_i32_i32_iPTR;
116 Table[RTLIB::MULO_I64] = i64_func_i64_i64_iPTR;
117 Table[RTLIB::MULO_I128] = i64_i64_func_i64_i64_i64_i64_iPTR;
118 Table[RTLIB::SDIV_I8] = i8_func_i8_i8;
119 Table[RTLIB::SDIV_I16] = i16_func_i16_i16;
120 Table[RTLIB::SDIV_I32] = i32_func_i32_i32;
121 Table[RTLIB::SDIV_I64] = i64_func_i64_i64;
122 Table[RTLIB::SDIV_I128] = i64_i64_func_i64_i64_i64_i64;
123 Table[RTLIB::UDIV_I8] = i8_func_i8_i8;
124 Table[RTLIB::UDIV_I16] = i16_func_i16_i16;
125 Table[RTLIB::UDIV_I32] = i32_func_i32_i32;
126 Table[RTLIB::UDIV_I64] = i64_func_i64_i64;
127 Table[RTLIB::UDIV_I128] = i64_i64_func_i64_i64_i64_i64;
128 Table[RTLIB::SREM_I8] = i8_func_i8_i8;
129 Table[RTLIB::SREM_I16] = i16_func_i16_i16;
130 Table[RTLIB::SREM_I32] = i32_func_i32_i32;
131 Table[RTLIB::SREM_I64] = i64_func_i64_i64;
132 Table[RTLIB::SREM_I128] = i64_i64_func_i64_i64_i64_i64;
133 Table[RTLIB::UREM_I8] = i8_func_i8_i8;
134 Table[RTLIB::UREM_I16] = i16_func_i16_i16;
135 Table[RTLIB::UREM_I32] = i32_func_i32_i32;
136 Table[RTLIB::UREM_I64] = i64_func_i64_i64;
137 Table[RTLIB::UREM_I128] = i64_i64_func_i64_i64_i64_i64;
138 Table[RTLIB::SDIVREM_I8] = i8_func_i8_i8;
139 Table[RTLIB::SDIVREM_I16] = i16_i16_func_i16_i16;
140 Table[RTLIB::SDIVREM_I32] = i32_i32_func_i32_i32;
141 Table[RTLIB::SDIVREM_I64] = i64_func_i64_i64;
142 Table[RTLIB::SDIVREM_I128] = i64_i64_i64_i64_func_i64_i64_i64_i64;
143 Table[RTLIB::UDIVREM_I8] = i8_func_i8_i8;
144 Table[RTLIB::UDIVREM_I16] = i16_i16_func_i16_i16;
145 Table[RTLIB::UDIVREM_I32] = i32_i32_func_i32_i32;
146 Table[RTLIB::UDIVREM_I64] = i64_i64_func_i64_i64;
147 Table[RTLIB::UDIVREM_I128] = i64_i64_i64_i64_func_i64_i64_i64_i64;
148 Table[RTLIB::NEG_I32] = i32_func_i32;
149 Table[RTLIB::NEG_I64] = i64_func_i64;
153 Table[RTLIB::ADD_F32] = f32_func_f32_f32;
154 Table[RTLIB::ADD_F64] = f64_func_f64_f64;
155 Table[RTLIB::ADD_F128] = i64_i64_func_i64_i64_i64_i64;
156 Table[RTLIB::SUB_F32] = f32_func_f32_f32;
157 Table[RTLIB::SUB_F64] = f64_func_f64_f64;
158 Table[RTLIB::SUB_F128] = i64_i64_func_i64_i64_i64_i64;
159 Table[RTLIB::MUL_F32] = f32_func_f32_f32;
160 Table[RTLIB::MUL_F64] = f64_func_f64_f64;
161 Table[RTLIB::MUL_F128] = i64_i64_func_i64_i64_i64_i64;
162 Table[RTLIB::DIV_F32] = f32_func_f32_f32;
163 Table[RTLIB::DIV_F64] = f64_func_f64_f64;
164 Table[RTLIB::DIV_F128] = i64_i64_func_i64_i64_i64_i64;
165 Table[RTLIB::REM_F32] = f32_func_f32_f32;
166 Table[RTLIB::REM_F64] = f64_func_f64_f64;
167 Table[RTLIB::REM_F128] = i64_i64_func_i64_i64_i64_i64;
168 Table[RTLIB::FMA_F32] = f32_func_f32_f32_f32;
169 Table[RTLIB::FMA_F64] = f64_func_f64_f64_f64;
170 Table[RTLIB::FMA_F128] = i64_i64_func_i64_i64_i64_i64_i64_i64;
171 Table[RTLIB::POWI_F32] = f32_func_f32_i32;
172 Table[RTLIB::POWI_F64] = f64_func_f64_i32;
173 Table[RTLIB::POWI_F128] = i64_i64_func_i64_i64_i32;
174 Table[RTLIB::SQRT_F32] = f32_func_f32;
175 Table[RTLIB::SQRT_F64] = f64_func_f64;
176 Table[RTLIB::SQRT_F128] = i64_i64_func_i64_i64;
177 Table[RTLIB::CBRT_F32] = f32_func_f32;
178 Table[RTLIB::CBRT_F64] = f64_func_f64;
179 Table[RTLIB::CBRT_F128] = i64_i64_func_i64_i64;
180 Table[RTLIB::LOG_F32] = f32_func_f32;
181 Table[RTLIB::LOG_F64] = f64_func_f64;
182 Table[RTLIB::LOG_F128] = i64_i64_func_i64_i64;
183 Table[RTLIB::LOG2_F32] = f32_func_f32;
184 Table[RTLIB::LOG2_F64] = f64_func_f64;
185 Table[RTLIB::LOG2_F128] = i64_i64_func_i64_i64;
186 Table[RTLIB::LOG10_F32] = f32_func_f32;
187 Table[RTLIB::LOG10_F64] = f64_func_f64;
188 Table[RTLIB::LOG10_F128] = i64_i64_func_i64_i64;
189 Table[RTLIB::EXP_F32] = f32_func_f32;
190 Table[RTLIB::EXP_F64] = f64_func_f64;
191 Table[RTLIB::EXP_F128] = i64_i64_func_i64_i64;
192 Table[RTLIB::EXP2_F32] = f32_func_f32;
193 Table[RTLIB::EXP2_F64] = f64_func_f64;
194 Table[RTLIB::EXP2_F128] = i64_i64_func_i64_i64;
195 Table[RTLIB::EXP10_F32] = f32_func_f32;
196 Table[RTLIB::EXP10_F64] = f64_func_f64;
197 Table[RTLIB::EXP10_F128] = i64_i64_func_i64_i64;
198 Table[RTLIB::SIN_F32] = f32_func_f32;
199 Table[RTLIB::SIN_F64] = f64_func_f64;
200 Table[RTLIB::SIN_F128] = i64_i64_func_i64_i64;
201 Table[RTLIB::COS_F32] = f32_func_f32;
202 Table[RTLIB::COS_F64] = f64_func_f64;
203 Table[RTLIB::COS_F128] = i64_i64_func_i64_i64;
204 Table[RTLIB::TAN_F32] = f32_func_f32;
205 Table[RTLIB::TAN_F64] = f64_func_f64;
206 Table[RTLIB::TAN_F128] = i64_i64_func_i64_i64;
207 Table[RTLIB::ASIN_F32] = f32_func_f32;
208 Table[RTLIB::ASIN_F64] = f64_func_f64;
209 Table[RTLIB::ASIN_F128] = i64_i64_func_i64_i64;
210 Table[RTLIB::ACOS_F32] = f32_func_f32;
211 Table[RTLIB::ACOS_F64] = f64_func_f64;
212 Table[RTLIB::ACOS_F128] = i64_i64_func_i64_i64;
213 Table[RTLIB::ATAN_F32] = f32_func_f32;
214 Table[RTLIB::ATAN_F64] = f64_func_f64;
215 Table[RTLIB::ATAN_F128] = i64_i64_func_i64_i64;
216 Table[RTLIB::SINH_F32] = f32_func_f32;
217 Table[RTLIB::SINH_F64] = f64_func_f64;
218 Table[RTLIB::SINH_F128] = i64_i64_func_i64_i64;
219 Table[RTLIB::COSH_F32] = f32_func_f32;
220 Table[RTLIB::COSH_F64] = f64_func_f64;
221 Table[RTLIB::COSH_F128] = i64_i64_func_i64_i64;
222 Table[RTLIB::TANH_F32] = f32_func_f32;
223 Table[RTLIB::TANH_F64] = f64_func_f64;
224 Table[RTLIB::TANH_F128] = i64_i64_func_i64_i64;
225 Table[RTLIB::SINCOS_F32] = func_f32_iPTR_iPTR;
226 Table[RTLIB::SINCOS_F64] = func_f64_iPTR_iPTR;
227 Table[RTLIB::SINCOS_F128] = func_i64_i64_iPTR_iPTR;
228 Table[RTLIB::POW_F32] = f32_func_f32_f32;
229 Table[RTLIB::POW_F64] = f64_func_f64_f64;
230 Table[RTLIB::POW_F128] = i64_i64_func_i64_i64_i64_i64;
231 Table[RTLIB::CEIL_F32] = f32_func_f32;
232 Table[RTLIB::CEIL_F64] = f64_func_f64;
233 Table[RTLIB::CEIL_F128] = i64_i64_func_i64_i64;
234 Table[RTLIB::TRUNC_F32] = f32_func_f32;
235 Table[RTLIB::TRUNC_F64] = f64_func_f64;
236 Table[RTLIB::TRUNC_F128] = i64_i64_func_i64_i64;
237 Table[RTLIB::RINT_F32] = f32_func_f32;
238 Table[RTLIB::RINT_F64] = f64_func_f64;
239 Table[RTLIB::RINT_F128] = i64_i64_func_i64_i64;
240 Table[RTLIB::NEARBYINT_F32] = f32_func_f32;
241 Table[RTLIB::NEARBYINT_F64] = f64_func_f64;
242 Table[RTLIB::NEARBYINT_F128] = i64_i64_func_i64_i64;
243 Table[RTLIB::ROUND_F32] = f32_func_f32;
244 Table[RTLIB::ROUND_F64] = f64_func_f64;
245 Table[RTLIB::ROUND_F128] = i64_i64_func_i64_i64;
246 Table[RTLIB::ROUNDEVEN_F32] = f32_func_f32;
247 Table[RTLIB::ROUNDEVEN_F64] = f64_func_f64;
248 Table[RTLIB::ROUNDEVEN_F128] = i64_i64_func_i64_i64;
249 Table[RTLIB::LROUND_F32] = iPTR_func_f32;
250 Table[RTLIB::LROUND_F64] = iPTR_func_f64;
251 Table[RTLIB::LROUND_F128] = iPTR_func_i64_i64;
252 Table[RTLIB::LLROUND_F32] = i64_func_f32;
253 Table[RTLIB::LLROUND_F64] = i64_func_f64;
254 Table[RTLIB::LLROUND_F128] = i64_func_i64_i64;
255 Table[RTLIB::LRINT_F32] = iPTR_func_f32;
256 Table[RTLIB::LRINT_F64] = iPTR_func_f64;
257 Table[RTLIB::LRINT_F128] = iPTR_func_i64_i64;
258 Table[RTLIB::LLRINT_F32] = i64_func_f32;
259 Table[RTLIB::LLRINT_F64] = i64_func_f64;
260 Table[RTLIB::LLRINT_F128] = i64_func_i64_i64;
261 Table[RTLIB::FLOOR_F32] = f32_func_f32;
262 Table[RTLIB::FLOOR_F64] = f64_func_f64;
263 Table[RTLIB::FLOOR_F128] = i64_i64_func_i64_i64;
264 Table[RTLIB::COPYSIGN_F32] = f32_func_f32_f32;
265 Table[RTLIB::COPYSIGN_F64] = f64_func_f64_f64;
266 Table[RTLIB::COPYSIGN_F128] = i64_i64_func_i64_i64_i64_i64;
267 Table[RTLIB::FMIN_F32] = f32_func_f32_f32;
268 Table[RTLIB::FMIN_F64] = f64_func_f64_f64;
269 Table[RTLIB::FMIN_F128] = i64_i64_func_i64_i64_i64_i64;
270 Table[RTLIB::FMAX_F32] = f32_func_f32_f32;
271 Table[RTLIB::FMAX_F64] = f64_func_f64_f64;
272 Table[RTLIB::FMAX_F128] = i64_i64_func_i64_i64_i64_i64;
273 Table[RTLIB::LDEXP_F32] = f32_func_f32_i32;
274 Table[RTLIB::LDEXP_F64] = f64_func_f64_i32;
275 Table[RTLIB::LDEXP_F128] = i64_i64_func_i64_i64_i32;
276 Table[RTLIB::FREXP_F32] = f32_func_f32_i32;
277 Table[RTLIB::FREXP_F64] = f64_func_f64_i32;
278 Table[RTLIB::FREXP_F128] = i64_i64_func_i64_i64_i32;
282 Table[RTLIB::FPEXT_F64_F128] = i64_i64_func_f64;
283 Table[RTLIB::FPEXT_F32_F128] = i64_i64_func_f32;
284 Table[RTLIB::FPEXT_F32_F64] = f64_func_f32;
285 Table[RTLIB::FPEXT_F16_F32] = f32_func_i16;
286 Table[RTLIB::FPROUND_F32_F16] = i16_func_f32;
287 Table[RTLIB::FPROUND_F64_F16] = i16_func_f64;
288 Table[RTLIB::FPROUND_F64_F32] = f32_func_f64;
289 Table[RTLIB::FPROUND_F128_F16] = i16_func_i64_i64;
290 Table[RTLIB::FPROUND_F128_F32] = f32_func_i64_i64;
291 Table[RTLIB::FPROUND_F128_F64] = f64_func_i64_i64;
292 Table[RTLIB::FPTOSINT_F32_I32] = i32_func_f32;
293 Table[RTLIB::FPTOSINT_F32_I64] = i64_func_f32;
294 Table[RTLIB::FPTOSINT_F32_I128] = i64_i64_func_f32;
295 Table[RTLIB::FPTOSINT_F64_I32] = i32_func_f64;
296 Table[RTLIB::FPTOSINT_F64_I64] = i64_func_f64;
297 Table[RTLIB::FPTOSINT_F64_I128] = i64_i64_func_f64;
298 Table[RTLIB::FPTOSINT_F128_I32] = i32_func_i64_i64;
299 Table[RTLIB::FPTOSINT_F128_I64] = i64_func_i64_i64;
300 Table[RTLIB::FPTOSINT_F128_I128] = i64_i64_func_i64_i64;
301 Table[RTLIB::FPTOUINT_F32_I32] = i32_func_f32;
302 Table[RTLIB::FPTOUINT_F32_I64] = i64_func_f32;
303 Table[RTLIB::FPTOUINT_F32_I128] = i64_i64_func_f32;
304 Table[RTLIB::FPTOUINT_F64_I32] = i32_func_f64;
305 Table[RTLIB::FPTOUINT_F64_I64] = i64_func_f64;
306 Table[RTLIB::FPTOUINT_F64_I128] = i64_i64_func_f64;
307 Table[RTLIB::FPTOUINT_F128_I32] = i32_func_i64_i64;
308 Table[RTLIB::FPTOUINT_F128_I64] = i64_func_i64_i64;
309 Table[RTLIB::FPTOUINT_F128_I128] = i64_i64_func_i64_i64;
310 Table[RTLIB::SINTTOFP_I32_F32] = f32_func_i32;
311 Table[RTLIB::SINTTOFP_I32_F64] = f64_func_i32;
312 Table[RTLIB::SINTTOFP_I32_F128] = i64_i64_func_i32;
313 Table[RTLIB::SINTTOFP_I64_F32] = f32_func_i64;
314 Table[RTLIB::SINTTOFP_I64_F64] = f64_func_i64;
315 Table[RTLIB::SINTTOFP_I64_F128] = i64_i64_func_i64;
316 Table[RTLIB::SINTTOFP_I128_F32] = f32_func_i64_i64;
317 Table[RTLIB::SINTTOFP_I128_F64] = f64_func_i64_i64;
318 Table[RTLIB::SINTTOFP_I128_F128] = i64_i64_func_i64_i64;
319 Table[RTLIB::UINTTOFP_I32_F32] = f32_func_i32;
320 Table[RTLIB::UINTTOFP_I32_F64] = f64_func_i64;
321 Table[RTLIB::UINTTOFP_I32_F128] = i64_i64_func_i32;
322 Table[RTLIB::UINTTOFP_I64_F32] = f32_func_i64;
323 Table[RTLIB::UINTTOFP_I64_F64] = f64_func_i64;
324 Table[RTLIB::UINTTOFP_I64_F128] = i64_i64_func_i64;
325 Table[RTLIB::UINTTOFP_I128_F32] = f32_func_i64_i64;
326 Table[RTLIB::UINTTOFP_I128_F64] = f64_func_i64_i64;
327 Table[RTLIB::UINTTOFP_I128_F128] = i64_i64_func_i64_i64;
331 Table[RTLIB::OEQ_F32] = i32_func_f32_f32;
332 Table[RTLIB::OEQ_F64] = i32_func_f64_f64;
333 Table[RTLIB::OEQ_F128] = i32_func_i64_i64_i64_i64;
334 Table[RTLIB::UNE_F32] = i32_func_f32_f32;
335 Table[RTLIB::UNE_F64] = i32_func_f64_f64;
336 Table[RTLIB::UNE_F128] = i32_func_i64_i64_i64_i64;
337 Table[RTLIB::OGE_F32] = i32_func_f32_f32;
338 Table[RTLIB::OGE_F64] = i32_func_f64_f64;
339 Table[RTLIB::OGE_F128] = i32_func_i64_i64_i64_i64;
340 Table[RTLIB::OLT_F32] = i32_func_f32_f32;
341 Table[RTLIB::OLT_F64] = i32_func_f64_f64;
342 Table[RTLIB::OLT_F128] = i32_func_i64_i64_i64_i64;
343 Table[RTLIB::OLE_F32] = i32_func_f32_f32;
344 Table[RTLIB::OLE_F64] = i32_func_f64_f64;
345 Table[RTLIB::OLE_F128] = i32_func_i64_i64_i64_i64;
346 Table[RTLIB::OGT_F32] = i32_func_f32_f32;
347 Table[RTLIB::OGT_F64] = i32_func_f64_f64;
348 Table[RTLIB::OGT_F128] = i32_func_i64_i64_i64_i64;
349 Table[RTLIB::UO_F32] = i32_func_f32_f32;
350 Table[RTLIB::UO_F64] = i32_func_f64_f64;
351 Table[RTLIB::UO_F128] = i32_func_i64_i64_i64_i64;
354 Table[RTLIB::MEMCPY] = iPTR_func_iPTR_iPTR_iPTR;
355 Table[RTLIB::MEMSET] = iPTR_func_iPTR_i32_iPTR;
356 Table[RTLIB::MEMMOVE] = iPTR_func_iPTR_iPTR_iPTR;
359 Table[RTLIB::STACKPROTECTOR_CHECK_FAIL] = func;
362 Table[RTLIB::RETURN_ADDRESS] = iPTR_func_i32;
366 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_1] =
unsupported;
367 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_2] =
unsupported;
368 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_4] =
unsupported;
369 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_8] =
unsupported;
370 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_16] =
unsupported;
371 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_1] =
unsupported;
372 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_2] =
unsupported;
373 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_4] =
unsupported;
374 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_8] =
unsupported;
375 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_16] =
unsupported;
377 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_1] =
unsupported;
378 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_2] =
unsupported;
379 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_4] =
unsupported;
380 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_8] =
unsupported;
381 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_16] =
unsupported;
385 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_1] =
unsupported;
386 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_2] =
unsupported;
387 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_4] =
unsupported;
388 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_8] =
unsupported;
389 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_16] =
unsupported;
390 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_1] =
unsupported;
391 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_2] =
unsupported;
392 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_4] =
unsupported;
393 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_8] =
unsupported;
394 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_16] =
unsupported;
424 Table[RTLIB::SYNC_FETCH_AND_NAND_16] =
unsupported;
434 Table[RTLIB::SYNC_FETCH_AND_UMAX_16] =
unsupported;
444 Table[RTLIB::SYNC_FETCH_AND_UMIN_16] =
unsupported;
469 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE] =
unsupported;
470 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_1] =
unsupported;
471 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_2] =
unsupported;
472 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_4] =
unsupported;
473 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_8] =
unsupported;
474 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_16] =
unsupported;
514RuntimeLibcallSignatureTable &getRuntimeLibcallSignatures() {
515 static RuntimeLibcallSignatureTable RuntimeLibcallSignatures;
516 return RuntimeLibcallSignatures;
521struct StaticLibcallNameMap {
523 StaticLibcallNameMap() {
524 static const std::pair<const char *, RTLIB::Libcall> NameLibcalls[] = {
525#define HANDLE_LIBCALL(code, name) {(const char *)name, RTLIB::code},
526#include "llvm/IR/RuntimeLibcalls.def"
529 for (
const auto &NameLibcall : NameLibcalls) {
530 if (NameLibcall.first !=
nullptr &&
531 getRuntimeLibcallSignatures().Table[NameLibcall.second] !=
533 assert(!
Map.contains(NameLibcall.first) &&
534 "duplicate libcall names in name map");
535 Map[NameLibcall.first] = NameLibcall.second;
540 Map[
"__extendhfsf2"] = RTLIB::FPEXT_F16_F32;
541 Map[
"__truncsfhf2"] = RTLIB::FPROUND_F32_F16;
543 Map[
"emscripten_return_address"] = RTLIB::RETURN_ADDRESS;
557 Subtarget.
hasAddr64() ? wasm::ValType::I64 : wasm::ValType::I32;
559 auto &Table = getRuntimeLibcallSignatures().Table;
623 case f32_func_f32_f32:
628 case f32_func_f32_i32:
633 case f32_func_i64_i64:
638 case f64_func_f64_f64:
643 case f64_func_f64_i32:
648 case f64_func_i64_i64:
661 case i16_func_i64_i64:
671 case func_f32_iPTR_iPTR:
676 case func_f64_iPTR_iPTR:
681 case i16_func_i16_i16:
686 case i32_func_f32_f32:
691 case i32_func_f64_f64:
696 case i32_func_i32_i32:
701 case i32_func_i32_i32_iPTR:
707 case i64_func_i64_i64:
712 case i64_func_i64_i64_iPTR:
718 case i64_i64_func_f32:
727 case i64_i64_func_f64:
736 case i16_i16_func_i16_i16:
746 case i32_i32_func_i32_i32:
756 case i64_i64_func_i64_i64:
766 case i64_i64_func_i64_i64_i64_i64:
778 case i64_i64_func_i64_i64_i64_i64_iPTR:
791 case i64_i64_i64_i64_func_i64_i64_i64_i64:
805 case i64_i64_func_i64_i64_i32:
820 case iPTR_func_iPTR_i32_iPTR:
826 case iPTR_func_iPTR_iPTR_iPTR:
832 case f32_func_f32_f32_f32:
838 case f64_func_f64_f64_f64:
844 case func_i64_i64_iPTR_iPTR:
850 case i32_func_i64_i64:
855 case i32_func_i64_i64_i64_i64:
870 case iPTR_func_i64_i64:
875 case i64_i64_func_i64_i64_i64_i64_i64_i64:
889 case i64_i64_func_i32:
898 case i64_i64_func_i64:
918 static StaticLibcallNameMap LibcallNameMap;
919 auto &Map = LibcallNameMap.Map;
920 auto Val = Map.find(
Name);
922 if (Val == Map.end()) {
924 std::string(
"unexpected runtime library name: ") + std::string(
Name);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file provides signature information for runtime libcalls.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
This file contains the declaration of the WebAssembly-specific utility functions.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Libcall
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit.
bool canLowerMultivalueReturn(const WebAssemblySubtarget *Subtarget)
Returns true if multivalue returns of a function can be lowered directly, i.e., not indirectly via a ...
void getLibcallSignature(const WebAssemblySubtarget &Subtarget, RTLIB::Libcall LC, SmallVectorImpl< wasm::ValType > &Rets, SmallVectorImpl< wasm::ValType > &Params)
This is an optimization pass for GlobalISel generic memory operations.