[Lldb-commits] [lldb] ff9efe2 - [LLDB][JIT] Set processor for ARM architecture

Pavel Kosov via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 16 23:15:20 PDT 2022


Author: Pavel Kosov
Date: 2022-08-17T09:10:21+03:00
New Revision: ff9efe240c4711572d2892f9058fd94a8bd5336e

URL: https://github.com/llvm/llvm-project/commit/ff9efe240c4711572d2892f9058fd94a8bd5336e
DIFF: https://github.com/llvm/llvm-project/commit/ff9efe240c4711572d2892f9058fd94a8bd5336e.diff

LOG: [LLDB][JIT] Set processor for ARM architecture

Patch sets ARM cpu, before compiling JIT code. This enables FastISel for armv6 and higher CPUs and allows using hardware FPU

~~~

OS Laboratory. Huawei RRI. Saint-Petersburg

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D131783

Added: 
    

Modified: 
    lldb/source/Utility/ArchSpec.cpp
    lldb/test/API/lang/c/fpeval/TestFPEval.py

Removed: 
    


################################################################################
diff  --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index b61d180bca1e9..348a62dd0df42 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -583,7 +583,6 @@ void ArchSpec::SetFlags(const std::string &elf_abi) {
 
 std::string ArchSpec::GetClangTargetCPU() const {
   std::string cpu;
-
   if (IsMIPS()) {
     switch (m_core) {
     case ArchSpec::eCore_mips32:
@@ -630,6 +629,9 @@ std::string ArchSpec::GetClangTargetCPU() const {
       break;
     }
   }
+
+  if (GetTriple().isARM())
+    cpu = GetTriple().getARMCPUForArch("").str();
   return cpu;
 }
 

diff  --git a/lldb/test/API/lang/c/fpeval/TestFPEval.py b/lldb/test/API/lang/c/fpeval/TestFPEval.py
index 6a3dc955ebf66..694d1ed7aa99d 100644
--- a/lldb/test/API/lang/c/fpeval/TestFPEval.py
+++ b/lldb/test/API/lang/c/fpeval/TestFPEval.py
@@ -19,7 +19,6 @@ def setUp(self):
         # Find the line number to break inside main().
         self.line = line_number('main.c', '// Set break point at this line.')
 
-    @skipIf(archs=no_match(['amd64', 'x86_64', 'arm64'])) # lldb jitter incorrectly evals function with FP args on 32 bit arm
     def test(self):
         """Test floating point expressions while jitter is disabled."""
         self.build()


        


More information about the lldb-commits mailing list