[Lldb-commits] [PATCH] lldb - towards AArch64 being recognised as platform architecture

Paul Osmialowski pawelo at king.net.pl
Sun Jul 27 10:26:32 PDT 2014


Newer version that fits to recent changes.

http://reviews.llvm.org/D4381

Files:
  include/lldb/Core/ArchSpec.h
  source/Core/ArchSpec.cpp

Index: include/lldb/Core/ArchSpec.h
===================================================================
--- include/lldb/Core/ArchSpec.h
+++ include/lldb/Core/ArchSpec.h
@@ -64,6 +64,8 @@
         eCore_thumbv7m,
         eCore_thumbv7em,
         eCore_arm_arm64,
+        eCore_arm_armv8,
+        eCore_arm_aarch64,
         
         eCore_mips64,
 
Index: source/Core/ArchSpec.cpp
===================================================================
--- source/Core/ArchSpec.cpp
+++ source/Core/ArchSpec.cpp
@@ -78,6 +78,8 @@
     { eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb  , ArchSpec::eCore_thumbv7m        , "thumbv7m"  },
     { eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb  , ArchSpec::eCore_thumbv7em       , "thumbv7em" },
     { eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64, ArchSpec::eCore_arm_arm64       , "arm64"     },
+    { eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64, ArchSpec::eCore_arm_armv8       , "armv8"     },
+    { eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64, ArchSpec::eCore_arm_aarch64     , "aarch64"   },
 
     { eByteOrderBig   , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64          , "mips64"    },
     
@@ -253,6 +255,7 @@
     { ArchSpec::eCore_ppc_generic     , llvm::ELF::EM_PPC    , LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // PowerPC
     { ArchSpec::eCore_ppc64_generic   , llvm::ELF::EM_PPC64  , LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // PowerPC64
     { ArchSpec::eCore_arm_generic     , llvm::ELF::EM_ARM    , LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // ARM
+    { ArchSpec::eCore_arm_aarch64     , llvm::ELF::EM_AARCH64, LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // ARM64
     { ArchSpec::eCore_sparc9_generic  , llvm::ELF::EM_SPARCV9, LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // SPARC V9
     { ArchSpec::eCore_x86_64_x86_64   , llvm::ELF::EM_X86_64 , LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // AMD64
     { ArchSpec::eCore_mips64          , llvm::ELF::EM_MIPS   , LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu }, // MIPS
@@ -977,6 +980,39 @@
         }
         break;
 
+    case ArchSpec::eCore_arm_armv8:
+        if (!enforce_exact_match)
+        {
+            if (core2 == ArchSpec::eCore_arm_arm64)
+                return true;
+            if (core2 == ArchSpec::eCore_arm_aarch64)
+                return true;
+            try_inverse = false;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_aarch64:
+        if (!enforce_exact_match)
+        {
+            if (core2 == ArchSpec::eCore_arm_arm64)
+                return true;
+            if (core2 == ArchSpec::eCore_arm_armv8)
+                return true;
+            try_inverse = false;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_arm64:
+        if (!enforce_exact_match)
+        {
+            if (core2 == ArchSpec::eCore_arm_aarch64)
+                return true;
+            if (core2 == ArchSpec::eCore_arm_armv8)
+                return true;
+            try_inverse = false;
+        }
+        break;
+
     default:
         break;
     }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4381.11922.patch
Type: text/x-patch
Size: 3090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140727/8f31b317/attachment.bin>


More information about the lldb-commits mailing list