[Lldb-commits] [lldb] [llvm] [lldb][RISCV] function calls support in lldb expressions (PR #99336)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 10 10:31:08 PDT 2024
================
@@ -471,6 +498,18 @@ static void SetupTargetOpts(CompilerInstance &compiler,
// Set the target ABI
if (std::string abi = GetClangTargetABI(target_arch); !abi.empty())
compiler.getTargetOpts().ABI = std::move(abi);
+
+ if ((target_machine == llvm::Triple::riscv64 &&
+ compiler.getTargetOpts().ABI == "lp64f") ||
+ (target_machine == llvm::Triple::riscv32 &&
+ compiler.getTargetOpts().ABI == "ilp32f"))
+ compiler->getTargetOpts().FeaturesAsWritten.emplace_back("+f");
+
+ if ((target_machine == llvm::Triple::riscv64 &&
+ compiler.getTargetOpts().ABI == "lp64d") ||
+ (target_machine == llvm::Triple::riscv32 &&
+ compiler.getTargetOpts().ABI == "ilp32d"))
+ compiler->getTargetOpts().FeaturesAsWritten.emplace_back("+d");
----------------
Michael137 wrote:
What happens if we just unconditionally add `+d` and `+f`? I'm not super familiar with RISCV but are ilp32d/ilp32f/ilp64f/ilp32f all the supported ABI strings? The GCC docs also seem to mention `rv64ifd`, e.g.. So my thinking is that we could maybe just enable these features for all targets (like we do with x86 sse?)
https://github.com/llvm/llvm-project/pull/99336
More information about the lldb-commits
mailing list