[llvm] MSP430: Move __mspabi_mpyll calling conv config to tablegen (PR #153988)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 16 18:39:43 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-msp430
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
There are several libcall choices for MUL_I64 which depend on the
subtarget, but this is the base case. The manual custom ISelLowering
is still overriding the decision until we have a way to control
lowering choices, but we can still get the calling convention
set for now.
---
Full diff: https://github.com/llvm/llvm-project/pull/153988.diff
2 Files Affected:
- (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+3)
- (modified) llvm/lib/IR/RuntimeLibcalls.cpp (-5)
``````````diff
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 9072a0aa1531f..fd30debda4067 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -2053,6 +2053,9 @@ def MSP430SystemLibrary
__mspabi_remul,
LibcallsWithCC<(add __mspabi_remull), MSP430_BUILTIN>,
+ // May not be used depending on subtarget
+ LibcallsWithCC<(add __mspabi_mpyll), MSP430_BUILTIN>,
+
// Bitwise Operations - EABI Table 10
// TODO: __mspabi_[srli/srai/slli] ARE implemented in libgcc
__mspabi_srll,
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 88cb192c08781..09fb78e7a2ac8 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -54,11 +54,6 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
return;
}
-
- if (TT.getArch() == Triple::ArchType::msp430) {
- setLibcallImplCallingConv(RTLIB::__mspabi_mpyll,
- CallingConv::MSP430_BUILTIN);
- }
}
LLVM_ATTRIBUTE_ALWAYS_INLINE
``````````
</details>
https://github.com/llvm/llvm-project/pull/153988
More information about the llvm-commits
mailing list