Skip to content

Commit

Permalink
[lldb][LoongArch] Function calls support in lldb expressions
Browse files Browse the repository at this point in the history
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 llvm#99336
Depens on: llvm#114741

Reviewed By: SixWeining

Pull Request: llvm#114742
  • Loading branch information
wangleiat authored and Groverkss committed Nov 15, 2024
1 parent c1f2a31 commit 1b2da83
Show file tree
Hide file tree
Showing 7 changed files with 840 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lldb/include/lldb/Utility/ArchSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ class ArchSpec {
eRISCVSubType_riscv64,
};

enum LoongArcheflags {
eLoongArch_abi_soft_float = 0x00000000, /// soft float
eLoongArch_abi_single_float =
0x00000001, /// single precision floating point, +f
eLoongArch_abi_double_float =
0x00000002, /// double precision floating point, +d
eLoongArch_abi_mask = 0x00000003,
};

enum LoongArchSubType {
eLoongArchSubType_unknown,
eLoongArchSubType_loongarch32,
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/ABI/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
foreach(target AArch64 ARM ARC Hexagon Mips MSP430 PowerPC RISCV SystemZ X86)
foreach(target AArch64 ARM ARC Hexagon LoongArch Mips MSP430 PowerPC RISCV SystemZ X86)
if (${target} IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(${target})
endif()
Expand Down
Loading

0 comments on commit 1b2da83

Please sign in to comment.