Skip to content

Commit 78df650

Browse files
committed
MSP430: Move libcall CC setting to RuntimeLibcallsInfo
As a temporary step configure the calling convention here. This can't be moved into tablegen until RuntimeLibcallsInfo is split into a separate lowering component.
1 parent c7f71df commit 78df650

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

llvm/lib/IR/RuntimeLibcalls.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
365365
RTLIB::HEXAGON_MEMCPY_LIKELY_ALIGNED_MIN32BYTES_MULT8BYTES,
366366
RTLIB::__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes);
367367
}
368+
369+
if (TT.getArch() == Triple::ArchType::msp430) {
370+
setLibcallImplCallingConv(RTLIB::__mspabi_mpyll,
371+
CallingConv::MSP430_BUILTIN);
372+
}
368373
}
369374

370375
bool RuntimeLibcallsInfo::darwinHasExp10(const Triple &TT) {

llvm/lib/Target/MSP430/MSP430ISelLowering.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ MSP430TargetLowering::MSP430TargetLowering(const TargetMachine &TM,
208208
for (const auto &LC : LibraryCalls) {
209209
setLibcallImpl(LC.Op, LC.Impl);
210210
}
211-
setLibcallImplCallingConv(RTLIB::__mspabi_mpyll,
212-
CallingConv::MSP430_BUILTIN);
213211
}
214212

215213
setMinFunctionAlignment(Align(2));

0 commit comments

Comments
 (0)