62 i32_func_i32_i32_iPTR,
64 i64_func_i64_i64_iPTR,
70 i64_i64_func_i64_i64_i64_i64,
71 i64_i64_func_i64_i64_i64_i64_iPTR,
72 i64_i64_i64_i64_func_i64_i64_i64_i64,
73 i64_i64_func_i64_i64_i32,
74 iPTR_func_iPTR_i32_iPTR,
75 iPTR_func_iPTR_iPTR_iPTR,
78 func_i64_i64_iPTR_iPTR,
84 func_iPTR_i64_i64_i64_i64,
85 func_iPTR_i64_i64_i64_i64_i64_i64,
87 i32_func_i64_i64_i64_i64,
91 struct RuntimeLibcallSignatureTable {
92 std::vector<RuntimeLibcallSignature> Table;
95 RuntimeLibcallSignatureTable() : Table(RTLIB::UNKNOWN_LIBCALL, unsupported) {
97 Table[RTLIB::SHL_I16] = i16_func_i16_i16;
98 Table[RTLIB::SHL_I32] = i32_func_i32_i32;
99 Table[RTLIB::SHL_I64] = i64_func_i64_i64;
100 Table[RTLIB::SHL_I128] = i64_i64_func_i64_i64_i32;
101 Table[RTLIB::SRL_I16] = i16_func_i16_i16;
102 Table[RTLIB::SRL_I32] = i32_func_i32_i32;
103 Table[RTLIB::SRL_I64] = i64_func_i64_i64;
104 Table[RTLIB::SRL_I128] = i64_i64_func_i64_i64_i32;
105 Table[RTLIB::SRA_I16] = i16_func_i16_i16;
106 Table[RTLIB::SRA_I32] = i32_func_i32_i32;
107 Table[RTLIB::SRA_I64] = i64_func_i64_i64;
108 Table[RTLIB::SRA_I128] = i64_i64_func_i64_i64_i32;
109 Table[RTLIB::MUL_I8] = i8_func_i8_i8;
110 Table[RTLIB::MUL_I16] = i16_func_i16_i16;
111 Table[RTLIB::MUL_I32] = i32_func_i32_i32;
112 Table[RTLIB::MUL_I64] = i64_func_i64_i64;
113 Table[RTLIB::MUL_I128] = i64_i64_func_i64_i64_i64_i64;
114 Table[RTLIB::MULO_I32] = i32_func_i32_i32_iPTR;
115 Table[RTLIB::MULO_I64] = i64_func_i64_i64_iPTR;
116 Table[RTLIB::MULO_I128] = i64_i64_func_i64_i64_i64_i64_iPTR;
117 Table[RTLIB::SDIV_I8] = i8_func_i8_i8;
118 Table[RTLIB::SDIV_I16] = i16_func_i16_i16;
119 Table[RTLIB::SDIV_I32] = i32_func_i32_i32;
120 Table[RTLIB::SDIV_I64] = i64_func_i64_i64;
121 Table[RTLIB::SDIV_I128] = i64_i64_func_i64_i64_i64_i64;
122 Table[RTLIB::UDIV_I8] = i8_func_i8_i8;
123 Table[RTLIB::UDIV_I16] = i16_func_i16_i16;
124 Table[RTLIB::UDIV_I32] = i32_func_i32_i32;
125 Table[RTLIB::UDIV_I64] = i64_func_i64_i64;
126 Table[RTLIB::UDIV_I128] = i64_i64_func_i64_i64_i64_i64;
127 Table[RTLIB::SREM_I8] = i8_func_i8_i8;
128 Table[RTLIB::SREM_I16] = i16_func_i16_i16;
129 Table[RTLIB::SREM_I32] = i32_func_i32_i32;
130 Table[RTLIB::SREM_I64] = i64_func_i64_i64;
131 Table[RTLIB::SREM_I128] = i64_i64_func_i64_i64_i64_i64;
132 Table[RTLIB::UREM_I8] = i8_func_i8_i8;
133 Table[RTLIB::UREM_I16] = i16_func_i16_i16;
134 Table[RTLIB::UREM_I32] = i32_func_i32_i32;
135 Table[RTLIB::UREM_I64] = i64_func_i64_i64;
136 Table[RTLIB::UREM_I128] = i64_i64_func_i64_i64_i64_i64;
137 Table[RTLIB::SDIVREM_I8] = i8_func_i8_i8;
138 Table[RTLIB::SDIVREM_I16] = i16_i16_func_i16_i16;
139 Table[RTLIB::SDIVREM_I32] = i32_i32_func_i32_i32;
140 Table[RTLIB::SDIVREM_I64] = i64_func_i64_i64;
141 Table[RTLIB::SDIVREM_I128] = i64_i64_i64_i64_func_i64_i64_i64_i64;
142 Table[RTLIB::UDIVREM_I8] = i8_func_i8_i8;
143 Table[RTLIB::UDIVREM_I16] = i16_i16_func_i16_i16;
144 Table[RTLIB::UDIVREM_I32] = i32_i32_func_i32_i32;
145 Table[RTLIB::UDIVREM_I64] = i64_i64_func_i64_i64;
146 Table[RTLIB::UDIVREM_I128] = i64_i64_i64_i64_func_i64_i64_i64_i64;
147 Table[RTLIB::NEG_I32] = i32_func_i32;
148 Table[RTLIB::NEG_I64] = i64_func_i64;
152 Table[RTLIB::ADD_F32] = f32_func_f32_f32;
153 Table[RTLIB::ADD_F64] = f64_func_f64_f64;
154 Table[RTLIB::ADD_F128] = func_iPTR_i64_i64_i64_i64;
155 Table[RTLIB::SUB_F32] = f32_func_f32_f32;
156 Table[RTLIB::SUB_F64] = f64_func_f64_f64;
157 Table[RTLIB::SUB_F128] = func_iPTR_i64_i64_i64_i64;
158 Table[RTLIB::MUL_F32] = f32_func_f32_f32;
159 Table[RTLIB::MUL_F64] = f64_func_f64_f64;
160 Table[RTLIB::MUL_F128] = func_iPTR_i64_i64_i64_i64;
161 Table[RTLIB::DIV_F32] = f32_func_f32_f32;
162 Table[RTLIB::DIV_F64] = f64_func_f64_f64;
163 Table[RTLIB::DIV_F128] = func_iPTR_i64_i64_i64_i64;
164 Table[RTLIB::REM_F32] = f32_func_f32_f32;
165 Table[RTLIB::REM_F64] = f64_func_f64_f64;
166 Table[RTLIB::REM_F128] = func_iPTR_i64_i64_i64_i64;
167 Table[RTLIB::FMA_F32] = f32_func_f32_f32_f32;
168 Table[RTLIB::FMA_F64] = f64_func_f64_f64_f64;
169 Table[RTLIB::FMA_F128] = func_iPTR_i64_i64_i64_i64_i64_i64;
170 Table[RTLIB::POWI_F32] = f32_func_f32_i32;
171 Table[RTLIB::POWI_F64] = f64_func_f64_i32;
172 Table[RTLIB::POWI_F128] = func_iPTR_i64_i64_i64_i64;
173 Table[RTLIB::SQRT_F32] = f32_func_f32;
174 Table[RTLIB::SQRT_F64] = f64_func_f64;
175 Table[RTLIB::SQRT_F128] = func_iPTR_i64_i64;
176 Table[RTLIB::LOG_F32] = f32_func_f32;
177 Table[RTLIB::LOG_F64] = f64_func_f64;
178 Table[RTLIB::LOG_F128] = func_iPTR_i64_i64;
179 Table[RTLIB::LOG2_F32] = f32_func_f32;
180 Table[RTLIB::LOG2_F64] = f64_func_f64;
181 Table[RTLIB::LOG2_F128] = func_iPTR_i64_i64;
182 Table[RTLIB::LOG10_F32] = f32_func_f32;
183 Table[RTLIB::LOG10_F64] = f64_func_f64;
184 Table[RTLIB::LOG10_F128] = func_iPTR_i64_i64;
185 Table[RTLIB::EXP_F32] = f32_func_f32;
186 Table[RTLIB::EXP_F64] = f64_func_f64;
187 Table[RTLIB::EXP_F128] = func_iPTR_i64_i64;
188 Table[RTLIB::EXP2_F32] = f32_func_f32;
189 Table[RTLIB::EXP2_F64] = f64_func_f64;
190 Table[RTLIB::EXP2_F128] = func_iPTR_i64_i64;
191 Table[RTLIB::SIN_F32] = f32_func_f32;
192 Table[RTLIB::SIN_F64] = f64_func_f64;
193 Table[RTLIB::SIN_F128] = func_iPTR_i64_i64;
194 Table[RTLIB::COS_F32] = f32_func_f32;
195 Table[RTLIB::COS_F64] = f64_func_f64;
196 Table[RTLIB::COS_F128] = func_iPTR_i64_i64;
197 Table[RTLIB::SINCOS_F32] = func_f32_iPTR_iPTR;
198 Table[RTLIB::SINCOS_F64] = func_f64_iPTR_iPTR;
199 Table[RTLIB::SINCOS_F128] = func_i64_i64_iPTR_iPTR;
200 Table[RTLIB::POW_F32] = f32_func_f32_f32;
201 Table[RTLIB::POW_F64] = f64_func_f64_f64;
202 Table[RTLIB::POW_F128] = func_iPTR_i64_i64_i64_i64;
203 Table[RTLIB::CEIL_F32] = f32_func_f32;
204 Table[RTLIB::CEIL_F64] = f64_func_f64;
205 Table[RTLIB::CEIL_F128] = func_iPTR_i64_i64;
206 Table[RTLIB::TRUNC_F32] = f32_func_f32;
207 Table[RTLIB::TRUNC_F64] = f64_func_f64;
208 Table[RTLIB::TRUNC_F128] = func_iPTR_i64_i64;
209 Table[RTLIB::RINT_F32] = f32_func_f32;
210 Table[RTLIB::RINT_F64] = f64_func_f64;
211 Table[RTLIB::RINT_F128] = func_iPTR_i64_i64;
212 Table[RTLIB::NEARBYINT_F32] = f32_func_f32;
213 Table[RTLIB::NEARBYINT_F64] = f64_func_f64;
214 Table[RTLIB::NEARBYINT_F128] = func_iPTR_i64_i64;
215 Table[RTLIB::ROUND_F32] = f32_func_f32;
216 Table[RTLIB::ROUND_F64] = f64_func_f64;
217 Table[RTLIB::ROUND_F128] = func_iPTR_i64_i64;
218 Table[RTLIB::FLOOR_F32] = f32_func_f32;
219 Table[RTLIB::FLOOR_F64] = f64_func_f64;
220 Table[RTLIB::FLOOR_F128] = func_iPTR_i64_i64;
221 Table[RTLIB::COPYSIGN_F32] = f32_func_f32_f32;
222 Table[RTLIB::COPYSIGN_F64] = f64_func_f64_f64;
223 Table[RTLIB::COPYSIGN_F128] = func_iPTR_i64_i64_i64_i64;
224 Table[RTLIB::FMIN_F32] = f32_func_f32_f32;
225 Table[RTLIB::FMIN_F64] = f64_func_f64_f64;
226 Table[RTLIB::FMIN_F128] = func_iPTR_i64_i64_i64_i64;
227 Table[RTLIB::FMAX_F32] = f32_func_f32_f32;
228 Table[RTLIB::FMAX_F64] = f64_func_f64_f64;
229 Table[RTLIB::FMAX_F128] = func_iPTR_i64_i64_i64_i64;
233 Table[RTLIB::FPEXT_F64_F128] = func_iPTR_f64;
234 Table[RTLIB::FPEXT_F32_F128] = func_iPTR_f32;
235 Table[RTLIB::FPEXT_F32_F64] = f64_func_f32;
236 Table[RTLIB::FPEXT_F16_F32] = f32_func_i16;
237 Table[RTLIB::FPROUND_F32_F16] = i16_func_f32;
238 Table[RTLIB::FPROUND_F64_F32] = f32_func_f64;
239 Table[RTLIB::FPROUND_F128_F32] = f32_func_i64_i64;
240 Table[RTLIB::FPROUND_F128_F64] = f64_func_i64_i64;
241 Table[RTLIB::FPTOSINT_F32_I32] = i32_func_f32;
242 Table[RTLIB::FPTOSINT_F32_I64] = i64_func_f32;
243 Table[RTLIB::FPTOSINT_F32_I128] = i64_i64_func_f32;
244 Table[RTLIB::FPTOSINT_F64_I32] = i32_func_f64;
245 Table[RTLIB::FPTOSINT_F64_I64] = i64_func_f64;
246 Table[RTLIB::FPTOSINT_F64_I128] = i64_i64_func_f64;
247 Table[RTLIB::FPTOSINT_F128_I32] = i32_func_i64_i64;
248 Table[RTLIB::FPTOSINT_F128_I64] = i64_func_i64_i64;
249 Table[RTLIB::FPTOSINT_F128_I128] = i64_i64_func_i64_i64;
250 Table[RTLIB::FPTOUINT_F32_I32] = i32_func_f32;
251 Table[RTLIB::FPTOUINT_F32_I64] = i64_func_f32;
252 Table[RTLIB::FPTOUINT_F32_I128] = i64_i64_func_f32;
253 Table[RTLIB::FPTOUINT_F64_I32] = i32_func_f64;
254 Table[RTLIB::FPTOUINT_F64_I64] = i64_func_f64;
255 Table[RTLIB::FPTOUINT_F64_I128] = i64_i64_func_f64;
256 Table[RTLIB::FPTOUINT_F128_I32] = i32_func_i64_i64;
257 Table[RTLIB::FPTOUINT_F128_I64] = i64_func_i64_i64;
258 Table[RTLIB::FPTOUINT_F128_I128] = i64_i64_func_i64_i64;
259 Table[RTLIB::SINTTOFP_I32_F32] = f32_func_i32;
260 Table[RTLIB::SINTTOFP_I32_F64] = f64_func_i32;
261 Table[RTLIB::SINTTOFP_I32_F128] = func_iPTR_i32;
262 Table[RTLIB::SINTTOFP_I64_F32] = f32_func_i64;
263 Table[RTLIB::SINTTOFP_I64_F64] = f64_func_i64;
264 Table[RTLIB::SINTTOFP_I64_F128] = func_iPTR_i64;
265 Table[RTLIB::SINTTOFP_I128_F32] = f32_func_i64_i64;
266 Table[RTLIB::SINTTOFP_I128_F64] = f64_func_i64_i64;
267 Table[RTLIB::SINTTOFP_I128_F128] = func_iPTR_i64_i64;
268 Table[RTLIB::UINTTOFP_I32_F32] = f32_func_i32;
269 Table[RTLIB::UINTTOFP_I32_F64] = f64_func_i64;
270 Table[RTLIB::UINTTOFP_I32_F128] = func_iPTR_i32;
271 Table[RTLIB::UINTTOFP_I64_F32] = f32_func_i64;
272 Table[RTLIB::UINTTOFP_I64_F64] = f64_func_i64;
273 Table[RTLIB::UINTTOFP_I64_F128] = func_iPTR_i64;
274 Table[RTLIB::UINTTOFP_I128_F32] = f32_func_i64_i64;
275 Table[RTLIB::UINTTOFP_I128_F64] = f64_func_i64_i64;
276 Table[RTLIB::UINTTOFP_I128_F128] = func_iPTR_i64_i64;
280 Table[RTLIB::OEQ_F32] = i32_func_f32_f32;
281 Table[RTLIB::OEQ_F64] = i32_func_f64_f64;
282 Table[RTLIB::OEQ_F128] = i32_func_i64_i64_i64_i64;
283 Table[RTLIB::UNE_F32] = i32_func_f32_f32;
284 Table[RTLIB::UNE_F64] = i32_func_f64_f64;
285 Table[RTLIB::UNE_F128] = i32_func_i64_i64_i64_i64;
286 Table[RTLIB::OGE_F32] = i32_func_f32_f32;
287 Table[RTLIB::OGE_F64] = i32_func_f64_f64;
288 Table[RTLIB::OGE_F128] = i32_func_i64_i64_i64_i64;
289 Table[RTLIB::OLT_F32] = i32_func_f32_f32;
290 Table[RTLIB::OLT_F64] = i32_func_f64_f64;
291 Table[RTLIB::OLT_F128] = i32_func_i64_i64_i64_i64;
292 Table[RTLIB::OLE_F32] = i32_func_f32_f32;
293 Table[RTLIB::OLE_F64] = i32_func_f64_f64;
294 Table[RTLIB::OLE_F128] = i32_func_i64_i64_i64_i64;
295 Table[RTLIB::OGT_F32] = i32_func_f32_f32;
296 Table[RTLIB::OGT_F64] = i32_func_f64_f64;
297 Table[RTLIB::OGT_F128] = i32_func_i64_i64_i64_i64;
298 Table[RTLIB::UO_F32] = i32_func_f32_f32;
299 Table[RTLIB::UO_F64] = i32_func_f64_f64;
300 Table[RTLIB::UO_F128] = i32_func_i64_i64_i64_i64;
304 Table[RTLIB::O_F32] = unsupported;
305 Table[RTLIB::O_F64] = unsupported;
306 Table[RTLIB::O_F128] = unsupported;
310 Table[RTLIB::MEMSET] = iPTR_func_iPTR_i32_iPTR;
311 Table[RTLIB::MEMMOVE] = iPTR_func_iPTR_iPTR_iPTR;
315 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_1] = unsupported;
316 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_2] = unsupported;
317 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_4] = unsupported;
318 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_8] = unsupported;
319 Table[RTLIB::MEMCPY_ELEMENT_UNORDERED_ATOMIC_16] = unsupported;
320 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_1] = unsupported;
321 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_2] = unsupported;
322 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_4] = unsupported;
323 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_8] = unsupported;
324 Table[RTLIB::MEMMOVE_ELEMENT_UNORDERED_ATOMIC_16] = unsupported;
326 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_1] = unsupported;
327 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_2] = unsupported;
328 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_4] = unsupported;
329 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_8] = unsupported;
330 Table[RTLIB::MEMSET_ELEMENT_UNORDERED_ATOMIC_16] = unsupported;
334 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_1] = unsupported;
335 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_2] = unsupported;
336 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_4] = unsupported;
337 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_8] = unsupported;
338 Table[RTLIB::SYNC_VAL_COMPARE_AND_SWAP_16] = unsupported;
339 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_1] = unsupported;
340 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_2] = unsupported;
341 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_4] = unsupported;
342 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_8] = unsupported;
343 Table[RTLIB::SYNC_LOCK_TEST_AND_SET_16] = unsupported;
344 Table[RTLIB::SYNC_FETCH_AND_ADD_1] = unsupported;
345 Table[RTLIB::SYNC_FETCH_AND_ADD_2] = unsupported;
346 Table[RTLIB::SYNC_FETCH_AND_ADD_4] = unsupported;
347 Table[RTLIB::SYNC_FETCH_AND_ADD_8] = unsupported;
348 Table[RTLIB::SYNC_FETCH_AND_ADD_16] = unsupported;
349 Table[RTLIB::SYNC_FETCH_AND_SUB_1] = unsupported;
350 Table[RTLIB::SYNC_FETCH_AND_SUB_2] = unsupported;
351 Table[RTLIB::SYNC_FETCH_AND_SUB_4] = unsupported;
352 Table[RTLIB::SYNC_FETCH_AND_SUB_8] = unsupported;
353 Table[RTLIB::SYNC_FETCH_AND_SUB_16] = unsupported;
354 Table[RTLIB::SYNC_FETCH_AND_AND_1] = unsupported;
355 Table[RTLIB::SYNC_FETCH_AND_AND_2] = unsupported;
356 Table[RTLIB::SYNC_FETCH_AND_AND_4] = unsupported;
357 Table[RTLIB::SYNC_FETCH_AND_AND_8] = unsupported;
358 Table[RTLIB::SYNC_FETCH_AND_AND_16] = unsupported;
359 Table[RTLIB::SYNC_FETCH_AND_OR_1] = unsupported;
360 Table[RTLIB::SYNC_FETCH_AND_OR_2] = unsupported;
361 Table[RTLIB::SYNC_FETCH_AND_OR_4] = unsupported;
362 Table[RTLIB::SYNC_FETCH_AND_OR_8] = unsupported;
363 Table[RTLIB::SYNC_FETCH_AND_OR_16] = unsupported;
364 Table[RTLIB::SYNC_FETCH_AND_XOR_1] = unsupported;
365 Table[RTLIB::SYNC_FETCH_AND_XOR_2] = unsupported;
366 Table[RTLIB::SYNC_FETCH_AND_XOR_4] = unsupported;
367 Table[RTLIB::SYNC_FETCH_AND_XOR_8] = unsupported;
368 Table[RTLIB::SYNC_FETCH_AND_XOR_16] = unsupported;
369 Table[RTLIB::SYNC_FETCH_AND_NAND_1] = unsupported;
370 Table[RTLIB::SYNC_FETCH_AND_NAND_2] = unsupported;
371 Table[RTLIB::SYNC_FETCH_AND_NAND_4] = unsupported;
372 Table[RTLIB::SYNC_FETCH_AND_NAND_8] = unsupported;
373 Table[RTLIB::SYNC_FETCH_AND_NAND_16] = unsupported;
374 Table[RTLIB::SYNC_FETCH_AND_MAX_1] = unsupported;
375 Table[RTLIB::SYNC_FETCH_AND_MAX_2] = unsupported;
376 Table[RTLIB::SYNC_FETCH_AND_MAX_4] = unsupported;
377 Table[RTLIB::SYNC_FETCH_AND_MAX_8] = unsupported;
378 Table[RTLIB::SYNC_FETCH_AND_MAX_16] = unsupported;
379 Table[RTLIB::SYNC_FETCH_AND_UMAX_1] = unsupported;
380 Table[RTLIB::SYNC_FETCH_AND_UMAX_2] = unsupported;
381 Table[RTLIB::SYNC_FETCH_AND_UMAX_4] = unsupported;
382 Table[RTLIB::SYNC_FETCH_AND_UMAX_8] = unsupported;
383 Table[RTLIB::SYNC_FETCH_AND_UMAX_16] = unsupported;
384 Table[RTLIB::SYNC_FETCH_AND_MIN_1] = unsupported;
385 Table[RTLIB::SYNC_FETCH_AND_MIN_2] = unsupported;
386 Table[RTLIB::SYNC_FETCH_AND_MIN_4] = unsupported;
387 Table[RTLIB::SYNC_FETCH_AND_MIN_8] = unsupported;
388 Table[RTLIB::SYNC_FETCH_AND_MIN_16] = unsupported;
389 Table[RTLIB::SYNC_FETCH_AND_UMIN_1] = unsupported;
390 Table[RTLIB::SYNC_FETCH_AND_UMIN_2] = unsupported;
391 Table[RTLIB::SYNC_FETCH_AND_UMIN_4] = unsupported;
392 Table[RTLIB::SYNC_FETCH_AND_UMIN_8] = unsupported;
393 Table[RTLIB::SYNC_FETCH_AND_UMIN_16] = unsupported;
398 Table[RTLIB::ATOMIC_LOAD_1] = unsupported;
399 Table[RTLIB::ATOMIC_LOAD_2] = unsupported;
400 Table[RTLIB::ATOMIC_LOAD_4] = unsupported;
401 Table[RTLIB::ATOMIC_LOAD_8] = unsupported;
402 Table[RTLIB::ATOMIC_LOAD_16] = unsupported;
405 Table[RTLIB::ATOMIC_STORE_1] = unsupported;
406 Table[RTLIB::ATOMIC_STORE_2] = unsupported;
407 Table[RTLIB::ATOMIC_STORE_4] = unsupported;
408 Table[RTLIB::ATOMIC_STORE_8] = unsupported;
409 Table[RTLIB::ATOMIC_STORE_16] = unsupported;
411 Table[RTLIB::ATOMIC_EXCHANGE] = unsupported;
412 Table[RTLIB::ATOMIC_EXCHANGE_1] = unsupported;
413 Table[RTLIB::ATOMIC_EXCHANGE_2] = unsupported;
414 Table[RTLIB::ATOMIC_EXCHANGE_4] = unsupported;
415 Table[RTLIB::ATOMIC_EXCHANGE_8] = unsupported;
416 Table[RTLIB::ATOMIC_EXCHANGE_16] = unsupported;
418 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE] = unsupported;
419 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_1] = unsupported;
420 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_2] = unsupported;
421 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_4] = unsupported;
422 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_8] = unsupported;
423 Table[RTLIB::ATOMIC_COMPARE_EXCHANGE_16] = unsupported;
425 Table[RTLIB::ATOMIC_FETCH_ADD_1] = unsupported;
426 Table[RTLIB::ATOMIC_FETCH_ADD_2] = unsupported;
427 Table[RTLIB::ATOMIC_FETCH_ADD_4] = unsupported;
428 Table[RTLIB::ATOMIC_FETCH_ADD_8] = unsupported;
429 Table[RTLIB::ATOMIC_FETCH_ADD_16] = unsupported;
431 Table[RTLIB::ATOMIC_FETCH_SUB_1] = unsupported;
432 Table[RTLIB::ATOMIC_FETCH_SUB_2] = unsupported;
433 Table[RTLIB::ATOMIC_FETCH_SUB_4] = unsupported;
434 Table[RTLIB::ATOMIC_FETCH_SUB_8] = unsupported;
435 Table[RTLIB::ATOMIC_FETCH_SUB_16] = unsupported;
437 Table[RTLIB::ATOMIC_FETCH_AND_1] = unsupported;
438 Table[RTLIB::ATOMIC_FETCH_AND_2] = unsupported;
439 Table[RTLIB::ATOMIC_FETCH_AND_4] = unsupported;
440 Table[RTLIB::ATOMIC_FETCH_AND_8] = unsupported;
441 Table[RTLIB::ATOMIC_FETCH_AND_16] = unsupported;
443 Table[RTLIB::ATOMIC_FETCH_OR_1] = unsupported;
444 Table[RTLIB::ATOMIC_FETCH_OR_2] = unsupported;
445 Table[RTLIB::ATOMIC_FETCH_OR_4] = unsupported;
446 Table[RTLIB::ATOMIC_FETCH_OR_8] = unsupported;
447 Table[RTLIB::ATOMIC_FETCH_OR_16] = unsupported;
449 Table[RTLIB::ATOMIC_FETCH_XOR_1] = unsupported;
450 Table[RTLIB::ATOMIC_FETCH_XOR_2] = unsupported;
451 Table[RTLIB::ATOMIC_FETCH_XOR_4] = unsupported;
452 Table[RTLIB::ATOMIC_FETCH_XOR_8] = unsupported;
453 Table[RTLIB::ATOMIC_FETCH_XOR_16] = unsupported;
455 Table[RTLIB::ATOMIC_FETCH_NAND_1] = unsupported;
456 Table[RTLIB::ATOMIC_FETCH_NAND_2] = unsupported;
457 Table[RTLIB::ATOMIC_FETCH_NAND_4] = unsupported;
458 Table[RTLIB::ATOMIC_FETCH_NAND_8] = unsupported;
459 Table[RTLIB::ATOMIC_FETCH_NAND_16] = unsupported;
467 struct StaticLibcallNameMap {
469 StaticLibcallNameMap() {
470 static const std::pair<const char *, RTLIB::Libcall> NameLibcalls[] = {
471 #define HANDLE_LIBCALL(code, name) {(const char *)name, RTLIB::code}, 472 #include "llvm/IR/RuntimeLibcalls.def" 473 #undef HANDLE_LIBCALL 475 for (
const auto &NameLibcall : NameLibcalls) {
476 if (NameLibcall.first !=
nullptr &&
477 RuntimeLibcallSignatures->Table[NameLibcall.second] != unsupported) {
479 "duplicate libcall names in name map");
480 Map[NameLibcall.first] = NameLibcall.second;
498 auto &Table = RuntimeLibcallSignatures->Table;
562 case f32_func_f32_f32:
567 case f32_func_f32_i32:
572 case f32_func_i64_i64:
577 case f64_func_f64_f64:
582 case f64_func_f64_i32:
587 case f64_func_i64_i64:
601 case func_f32_iPTR_iPTR:
606 case func_f64_iPTR_iPTR:
611 case i16_func_i16_i16:
616 case i32_func_f32_f32:
621 case i32_func_f64_f64:
626 case i32_func_i32_i32:
631 case i32_func_i32_i32_iPTR:
637 case i64_func_i64_i64:
642 case i64_func_i64_i64_iPTR:
648 case i64_i64_func_f32:
649 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 657 case i64_i64_func_f64:
658 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 666 case i16_i16_func_i16_i16:
667 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 676 case i32_i32_func_i32_i32:
677 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 686 case i64_i64_func_i64_i64:
687 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 696 case i64_i64_func_i64_i64_i64_i64:
697 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 708 case i64_i64_func_i64_i64_i64_i64_iPTR:
709 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 721 case i64_i64_i64_i64_func_i64_i64_i64_i64:
722 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 735 case i64_i64_func_i64_i64_i32:
736 #if 0 // TODO: Enable this when wasm gets multiple-return-value support. 748 case iPTR_func_iPTR_i32_iPTR:
754 case iPTR_func_iPTR_iPTR_iPTR:
760 case f32_func_f32_f32_f32:
766 case f64_func_f64_f64_f64:
772 case func_i64_i64_iPTR_iPTR:
794 case func_iPTR_i64_i64:
799 case func_iPTR_i64_i64_i64_i64:
806 case func_iPTR_i64_i64_i64_i64_i64_i64:
815 case i32_func_i64_i64:
820 case i32_func_i64_i64_i64_i64:
839 auto &Map = LibcallNameMap->Map;
840 auto val = Map.find(Name);
841 assert(val != Map.end() &&
"unexpected runtime library name");
This class represents lattice values for constants.
void push_back(const T &Elt)
Libcall
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit...
iterator find(StringRef Key)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
This file provides signature information for runtime libcalls.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void GetLibcallSignature(const WebAssemblySubtarget &Subtarget, RTLIB::Libcall LC, SmallVectorImpl< wasm::ValType > &Rets, SmallVectorImpl< wasm::ValType > &Params)
This file declares the WebAssembly-specific subclass of TargetSubtarget.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
LLVM_NODISCARD bool empty() const
static ManagedStatic< StaticLibcallNameMap > LibcallNameMap
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
OUTCHAIN = ATOMIC_STORE(INCHAIN, ptr, val) This corresponds to "store atomic" instruction.
Val, OUTCHAIN = ATOMIC_LOAD(INCHAIN, ptr) This corresponds to "load atomic" instruction.