@@ -148,103 +148,6 @@ MSP430TargetLowering::MSP430TargetLowering(const TargetMachine &TM,
148
148
setOperationAction (ISD::VACOPY, MVT::Other, Expand);
149
149
setOperationAction (ISD::JumpTable, MVT::i16 , Custom);
150
150
151
- // EABI Libcalls - EABI Section 6.2
152
- const struct {
153
- const RTLIB::Libcall Op;
154
- const char *const Name;
155
- } LibraryCalls[] = {
156
- // Floating point conversions - EABI Table 6
157
- {RTLIB::FPROUND_F64_F32, " __mspabi_cvtdf" },
158
- {RTLIB::FPEXT_F32_F64, " __mspabi_cvtfd" },
159
- // The following is NOT implemented in libgcc
160
- // { RTLIB::FPTOSINT_F64_I16, "__mspabi_fixdi" },
161
- {RTLIB::FPTOSINT_F64_I32, " __mspabi_fixdli" },
162
- {RTLIB::FPTOSINT_F64_I64, " __mspabi_fixdlli" },
163
- // The following is NOT implemented in libgcc
164
- // { RTLIB::FPTOUINT_F64_I16, "__mspabi_fixdu" },
165
- {RTLIB::FPTOUINT_F64_I32, " __mspabi_fixdul" },
166
- {RTLIB::FPTOUINT_F64_I64, " __mspabi_fixdull" },
167
- // The following is NOT implemented in libgcc
168
- // { RTLIB::FPTOSINT_F32_I16, "__mspabi_fixfi" },
169
- {RTLIB::FPTOSINT_F32_I32, " __mspabi_fixfli" },
170
- {RTLIB::FPTOSINT_F32_I64, " __mspabi_fixflli" },
171
- // The following is NOT implemented in libgcc
172
- // { RTLIB::FPTOUINT_F32_I16, "__mspabi_fixfu" },
173
- {RTLIB::FPTOUINT_F32_I32, " __mspabi_fixful" },
174
- {RTLIB::FPTOUINT_F32_I64, " __mspabi_fixfull" },
175
- // TODO The following IS implemented in libgcc
176
- // { RTLIB::SINTTOFP_I16_F64, "__mspabi_fltid" },
177
- {RTLIB::SINTTOFP_I32_F64, " __mspabi_fltlid" },
178
- // TODO The following IS implemented in libgcc but is not in the EABI
179
- {RTLIB::SINTTOFP_I64_F64, " __mspabi_fltllid" },
180
- // TODO The following IS implemented in libgcc
181
- // { RTLIB::UINTTOFP_I16_F64, "__mspabi_fltud" },
182
- {RTLIB::UINTTOFP_I32_F64, " __mspabi_fltuld" },
183
- // The following IS implemented in libgcc but is not in the EABI
184
- {RTLIB::UINTTOFP_I64_F64, " __mspabi_fltulld" },
185
- // TODO The following IS implemented in libgcc
186
- // { RTLIB::SINTTOFP_I16_F32, "__mspabi_fltif" },
187
- {RTLIB::SINTTOFP_I32_F32, " __mspabi_fltlif" },
188
- // TODO The following IS implemented in libgcc but is not in the EABI
189
- {RTLIB::SINTTOFP_I64_F32, " __mspabi_fltllif" },
190
- // TODO The following IS implemented in libgcc
191
- // { RTLIB::UINTTOFP_I16_F32, "__mspabi_fltuf" },
192
- {RTLIB::UINTTOFP_I32_F32, " __mspabi_fltulf" },
193
- // The following IS implemented in libgcc but is not in the EABI
194
- {RTLIB::UINTTOFP_I64_F32, " __mspabi_fltullf" },
195
-
196
- // Floating point comparisons - EABI Table 7
197
- {RTLIB::OEQ_F64, " __mspabi_cmpd" },
198
- {RTLIB::UNE_F64, " __mspabi_cmpd" },
199
- {RTLIB::OGE_F64, " __mspabi_cmpd" },
200
- {RTLIB::OLT_F64, " __mspabi_cmpd" },
201
- {RTLIB::OLE_F64, " __mspabi_cmpd" },
202
- {RTLIB::OGT_F64, " __mspabi_cmpd" },
203
- {RTLIB::OEQ_F32, " __mspabi_cmpf" },
204
- {RTLIB::UNE_F32, " __mspabi_cmpf" },
205
- {RTLIB::OGE_F32, " __mspabi_cmpf" },
206
- {RTLIB::OLT_F32, " __mspabi_cmpf" },
207
- {RTLIB::OLE_F32, " __mspabi_cmpf" },
208
- {RTLIB::OGT_F32, " __mspabi_cmpf" },
209
-
210
- // Floating point arithmetic - EABI Table 8
211
- {RTLIB::ADD_F64, " __mspabi_addd" },
212
- {RTLIB::ADD_F32, " __mspabi_addf" },
213
- {RTLIB::DIV_F64, " __mspabi_divd" },
214
- {RTLIB::DIV_F32, " __mspabi_divf" },
215
- {RTLIB::MUL_F64, " __mspabi_mpyd" },
216
- {RTLIB::MUL_F32, " __mspabi_mpyf" },
217
- {RTLIB::SUB_F64, " __mspabi_subd" },
218
- {RTLIB::SUB_F32, " __mspabi_subf" },
219
- // The following are NOT implemented in libgcc
220
- // { RTLIB::NEG_F64, "__mspabi_negd" },
221
- // { RTLIB::NEG_F32, "__mspabi_negf" },
222
-
223
- // Universal Integer Operations - EABI Table 9
224
- {RTLIB::SDIV_I16, " __mspabi_divi" },
225
- {RTLIB::SDIV_I32, " __mspabi_divli" },
226
- {RTLIB::SDIV_I64, " __mspabi_divlli" },
227
- {RTLIB::UDIV_I16, " __mspabi_divu" },
228
- {RTLIB::UDIV_I32, " __mspabi_divul" },
229
- {RTLIB::UDIV_I64, " __mspabi_divull" },
230
- {RTLIB::SREM_I16, " __mspabi_remi" },
231
- {RTLIB::SREM_I32, " __mspabi_remli" },
232
- {RTLIB::SREM_I64, " __mspabi_remlli" },
233
- {RTLIB::UREM_I16, " __mspabi_remu" },
234
- {RTLIB::UREM_I32, " __mspabi_remul" },
235
- {RTLIB::UREM_I64, " __mspabi_remull" },
236
-
237
- // Bitwise Operations - EABI Table 10
238
- // TODO: __mspabi_[srli/srai/slli] ARE implemented in libgcc
239
- {RTLIB::SRL_I32, " __mspabi_srll" },
240
- {RTLIB::SRA_I32, " __mspabi_sral" },
241
- {RTLIB::SHL_I32, " __mspabi_slll" },
242
- // __mspabi_[srlll/srall/sllll/rlli/rlll] are NOT implemented in libgcc
243
- };
244
-
245
- for (const auto &LC : LibraryCalls)
246
- setLibcallName (LC.Op , LC.Name );
247
-
248
151
if (STI.hasHWMult16 ()) {
249
152
const struct {
250
153
const RTLIB::Libcall Op;
@@ -308,23 +211,6 @@ MSP430TargetLowering::MSP430TargetLowering(const TargetMachine &TM,
308
211
setLibcallCallingConv (RTLIB::MUL_I64, CallingConv::MSP430_BUILTIN);
309
212
}
310
213
311
- // Several of the runtime library functions use a special calling conv
312
- setLibcallCallingConv (RTLIB::UDIV_I64, CallingConv::MSP430_BUILTIN);
313
- setLibcallCallingConv (RTLIB::UREM_I64, CallingConv::MSP430_BUILTIN);
314
- setLibcallCallingConv (RTLIB::SDIV_I64, CallingConv::MSP430_BUILTIN);
315
- setLibcallCallingConv (RTLIB::SREM_I64, CallingConv::MSP430_BUILTIN);
316
- setLibcallCallingConv (RTLIB::ADD_F64, CallingConv::MSP430_BUILTIN);
317
- setLibcallCallingConv (RTLIB::SUB_F64, CallingConv::MSP430_BUILTIN);
318
- setLibcallCallingConv (RTLIB::MUL_F64, CallingConv::MSP430_BUILTIN);
319
- setLibcallCallingConv (RTLIB::DIV_F64, CallingConv::MSP430_BUILTIN);
320
- setLibcallCallingConv (RTLIB::OEQ_F64, CallingConv::MSP430_BUILTIN);
321
- setLibcallCallingConv (RTLIB::UNE_F64, CallingConv::MSP430_BUILTIN);
322
- setLibcallCallingConv (RTLIB::OGE_F64, CallingConv::MSP430_BUILTIN);
323
- setLibcallCallingConv (RTLIB::OLT_F64, CallingConv::MSP430_BUILTIN);
324
- setLibcallCallingConv (RTLIB::OLE_F64, CallingConv::MSP430_BUILTIN);
325
- setLibcallCallingConv (RTLIB::OGT_F64, CallingConv::MSP430_BUILTIN);
326
- // TODO: __mspabi_srall, __mspabi_srlll, __mspabi_sllll
327
-
328
214
setMinFunctionAlignment (Align (2 ));
329
215
setPrefFunctionAlignment (Align (2 ));
330
216
setMaxAtomicSizeInBitsSupported (0 );
0 commit comments