https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/146081
>From 715cfc80ad3ca2b9451a6f544ad64c11ab7afde1 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 1376ffc7c7293..8c3257147213d 100644 --- a/llvm/lib/IR/RuntimeLibcalls.cpp +++ b/llvm/lib/IR/RuntimeLibcalls.cpp @@ -364,6 +364,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 1dc0f4a7d384b..d1474c7f248e9 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