llvm.org GIT mirror llvm / 8aa207e
Added required libcalls for PIC16 (mostly floating points to integer casting operations). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73480 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjiv Gupta 11 years ago
2 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
152152 FPROUND_PPCF128_F32,
153153 FPROUND_F80_F64,
154154 FPROUND_PPCF128_F64,
155 FPTOSINT_F32_I8,
156 FPTOSINT_F32_I16,
155157 FPTOSINT_F32_I32,
156158 FPTOSINT_F32_I64,
157159 FPTOSINT_F32_I128,
164166 FPTOSINT_PPCF128_I32,
165167 FPTOSINT_PPCF128_I64,
166168 FPTOSINT_PPCF128_I128,
169 FPTOUINT_F32_I8,
170 FPTOUINT_F32_I16,
167171 FPTOUINT_F32_I32,
168172 FPTOUINT_F32_I64,
169173 FPTOUINT_F32_I128,
176180 FPTOUINT_PPCF128_I32,
177181 FPTOUINT_PPCF128_I64,
178182 FPTOUINT_PPCF128_I128,
183 SINTTOFP_I32_F8,
184 SINTTOFP_I32_F16,
179185 SINTTOFP_I32_F32,
180186 SINTTOFP_I32_F64,
181187 SINTTOFP_I32_F80,
188194 SINTTOFP_I128_F64,
189195 SINTTOFP_I128_F80,
190196 SINTTOFP_I128_PPCF128,
197 UINTTOFP_I32_F8,
198 UINTTOFP_I32_F16,
191199 UINTTOFP_I32_F32,
192200 UINTTOFP_I32_F64,
193201 UINTTOFP_I32_F80,
170170 Names[RTLIB::FPROUND_PPCF128_F32] = "__trunctfsf2";
171171 Names[RTLIB::FPROUND_F80_F64] = "__truncxfdf2";
172172 Names[RTLIB::FPROUND_PPCF128_F64] = "__trunctfdf2";
173 Names[RTLIB::FPTOSINT_F32_I8] = "__fixsfsi";
174 Names[RTLIB::FPTOSINT_F32_I16] = "__fixsfsi";
173175 Names[RTLIB::FPTOSINT_F32_I32] = "__fixsfsi";
174176 Names[RTLIB::FPTOSINT_F32_I64] = "__fixsfdi";
175177 Names[RTLIB::FPTOSINT_F32_I128] = "__fixsfti";
182184 Names[RTLIB::FPTOSINT_PPCF128_I32] = "__fixtfsi";
183185 Names[RTLIB::FPTOSINT_PPCF128_I64] = "__fixtfdi";
184186 Names[RTLIB::FPTOSINT_PPCF128_I128] = "__fixtfti";
187 Names[RTLIB::FPTOUINT_F32_I8] = "__fixunssfsi";
188 Names[RTLIB::FPTOUINT_F32_I16] = "__fixunssfsi";
185189 Names[RTLIB::FPTOUINT_F32_I32] = "__fixunssfsi";
186190 Names[RTLIB::FPTOUINT_F32_I64] = "__fixunssfdi";
187191 Names[RTLIB::FPTOUINT_F32_I128] = "__fixunssfti";
194198 Names[RTLIB::FPTOUINT_PPCF128_I32] = "__fixunstfsi";
195199 Names[RTLIB::FPTOUINT_PPCF128_I64] = "__fixunstfdi";
196200 Names[RTLIB::FPTOUINT_PPCF128_I128] = "__fixunstfti";
201 Names[RTLIB::SINTTOFP_I32_F8] = "__floatsisf";
202 Names[RTLIB::SINTTOFP_I32_F16] = "__floatsisf";
197203 Names[RTLIB::SINTTOFP_I32_F32] = "__floatsisf";
198204 Names[RTLIB::SINTTOFP_I32_F64] = "__floatsidf";
199205 Names[RTLIB::SINTTOFP_I32_F80] = "__floatsixf";
206212 Names[RTLIB::SINTTOFP_I128_F64] = "__floattidf";
207213 Names[RTLIB::SINTTOFP_I128_F80] = "__floattixf";
208214 Names[RTLIB::SINTTOFP_I128_PPCF128] = "__floattitf";
215 Names[RTLIB::UINTTOFP_I32_F8] = "__floatunsisf";
216 Names[RTLIB::UINTTOFP_I32_F16] = "__floatunsisf";
209217 Names[RTLIB::UINTTOFP_I32_F32] = "__floatunsisf";
210218 Names[RTLIB::UINTTOFP_I32_F64] = "__floatunsidf";
211219 Names[RTLIB::UINTTOFP_I32_F80] = "__floatunsixf";
270278 /// UNKNOWN_LIBCALL if there is none.
271279 RTLIB::Libcall RTLIB::getFPTOSINT(MVT OpVT, MVT RetVT) {
272280 if (OpVT == MVT::f32) {
281 if (RetVT == MVT::i8)
282 return FPTOSINT_F32_I8;
283 if (RetVT == MVT::i16)
284 return FPTOSINT_F32_I16;
273285 if (RetVT == MVT::i32)
274286 return FPTOSINT_F32_I32;
275287 if (RetVT == MVT::i64)
305317 /// UNKNOWN_LIBCALL if there is none.
306318 RTLIB::Libcall RTLIB::getFPTOUINT(MVT OpVT, MVT RetVT) {
307319 if (OpVT == MVT::f32) {
320 if (RetVT == MVT::i8)
321 return FPTOUINT_F32_I8;
322 if (RetVT == MVT::i16)
323 return FPTOUINT_F32_I16;
308324 if (RetVT == MVT::i32)
309325 return FPTOUINT_F32_I32;
310326 if (RetVT == MVT::i64)