https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/146081
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. >From ff47400094d159274353b4322d98cad6e3bf4181 Mon Sep 17 00:00:00 2001 From: Matt Arsenault <matthew.arsena...@amd.com> Date: Mon, 23 Jun 2025 16:35:14 +0900 Subject: [PATCH] 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. --- llvm/lib/IR/RuntimeLibcalls.cpp | 5 +++++ llvm/lib/Target/MSP430/MSP430ISelLowering.cpp | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp index 6f1f7014249c7..a5605329c7d28 100644 --- a/llvm/lib/IR/RuntimeLibcalls.cpp +++ b/llvm/lib/IR/RuntimeLibcalls.cpp @@ -365,6 +365,11 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT, RTLIB::HEXAGON_MEMCPY_LIKELY_ALIGNED_MIN32BYTES_MULT8BYTES, RTLIB::__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes); } + + if (TT.getArch() == Triple::ArchType::msp430) { + setLibcallImplCallingConv(RTLIB::__mspabi_mpyll, + CallingConv::MSP430_BUILTIN); + } } bool RuntimeLibcallsInfo::darwinHasExp10(const Triple &TT) { diff --git a/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp b/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp index d558dd253dc46..0d7c7b5c7a813 100644 --- a/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp +++ b/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp @@ -208,8 +208,6 @@ MSP430TargetLowering::MSP430TargetLowering(const TargetMachine &TM, for (const auto &LC : LibraryCalls) { setLibcallImpl(LC.Op, LC.Impl); } - setLibcallImplCallingConv(RTLIB::__mspabi_mpyll, - CallingConv::MSP430_BUILTIN); } setMinFunctionAlignment(Align(2)); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits