[lldb][LoongArch] Function calls support in lldb expressions
This patch adds desired feature flags in JIT compiler to enable hard-float instructions if target supports them and allows to use floats and doubles in lldb expressions. Fited tests: lldb-shell :: Expr/TestAnonNamespaceParamFunc.cpp lldb-shell :: Expr/TestIRMemoryMap.test lldb-shell :: Expr/TestStringLiteralExpr.test lldb-shell :: SymbolFile/DWARF/debug-types-expressions.test Similar as #99336 Depens on: https://github.com/llvm/llvm-project/pull/114741 Reviewed By: SixWeining Pull Request: https://github.com/llvm/llvm-project/pull/114742
This commit is contained in:
@@ -1436,6 +1436,23 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers,
|
||||
arch_spec.SetFlags(flags);
|
||||
}
|
||||
|
||||
if (arch_spec.GetMachine() == llvm::Triple::loongarch32 ||
|
||||
arch_spec.GetMachine() == llvm::Triple::loongarch64) {
|
||||
uint32_t flags = arch_spec.GetFlags();
|
||||
switch (header.e_flags & llvm::ELF::EF_LOONGARCH_ABI_MODIFIER_MASK) {
|
||||
case llvm::ELF::EF_LOONGARCH_ABI_SINGLE_FLOAT:
|
||||
flags |= ArchSpec::eLoongArch_abi_single_float;
|
||||
break;
|
||||
case llvm::ELF::EF_LOONGARCH_ABI_DOUBLE_FLOAT:
|
||||
flags |= ArchSpec::eLoongArch_abi_double_float;
|
||||
break;
|
||||
case llvm::ELF::EF_LOONGARCH_ABI_SOFT_FLOAT:
|
||||
break;
|
||||
}
|
||||
|
||||
arch_spec.SetFlags(flags);
|
||||
}
|
||||
|
||||
// If there are no section headers we are done.
|
||||
if (header.e_shnum == 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user