diff options
author | Jason Molenda <jmolenda@apple.com> | 2019-10-16 19:14:49 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2019-10-16 19:14:49 +0000 |
commit | 7dd7a3607596a51044b8706ebf6df2e613ce1e9b (patch) | |
tree | ceaacaa39ab7238f81442a520fc67f7c17b7294f /lldb/source/Host/macosx/objcxx | |
parent | 930ada91ce8ff9715e2ca7309bc946dbb9162dfb (diff) | |
download | bcm5719-llvm-7dd7a3607596a51044b8706ebf6df2e613ce1e9b.tar.gz bcm5719-llvm-7dd7a3607596a51044b8706ebf6df2e613ce1e9b.zip |
Add arm64_32 support to lldb, an ILP32 codegen
that runs on arm64 ISA targets, specifically
Apple watches.
Differential Revision: https://reviews.llvm.org/D68858
llvm-svn: 375032
Diffstat (limited to 'lldb/source/Host/macosx/objcxx')
-rw-r--r-- | lldb/source/Host/macosx/objcxx/Host.mm | 6 | ||||
-rw-r--r-- | lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index fe31830b93e..8c7393739bc 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -471,6 +471,12 @@ static bool GetMacOSXProcessCPUType(ProcessInstanceInfo &process_info) { break; #endif +#if defined(CPU_TYPE_ARM64_32) && defined(CPU_SUBTYPE_ARM64_32_ALL) + case CPU_TYPE_ARM64_32: + sub = CPU_SUBTYPE_ARM64_32_ALL; + break; +#endif + case CPU_TYPE_ARM: { // Note that we fetched the cpu type from the PROCESS but we can't get a // cpusubtype of the diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm index 3f3f301b540..ecff11f410c 100644 --- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -42,6 +42,11 @@ #define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) #endif +#ifndef CPU_TYPE_ARM64_32 +#define CPU_ARCH_ABI64_32 0x02000000 +#define (CPU_TYPE_ARM | CPU_ARCH_ABI64_32) +#endif + #include <TargetConditionals.h> // for TARGET_OS_TV, TARGET_OS_WATCH using namespace lldb_private; @@ -257,7 +262,9 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, arch_32.SetArchitecture(eArchTypeMachO, cputype & ~(CPU_ARCH_MASK), cpusubtype32); - if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64) { + if (cputype == CPU_TYPE_ARM || + cputype == CPU_TYPE_ARM64 || + cputype == CPU_TYPE_ARM64_32) { // When running on a watch or tv, report the host os correctly #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1 arch_32.GetTriple().setOS(llvm::Triple::TvOS); @@ -265,6 +272,9 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1 arch_32.GetTriple().setOS(llvm::Triple::BridgeOS); arch_64.GetTriple().setOS(llvm::Triple::BridgeOS); +#elif defined(TARGET_OS_WATCHOS) && TARGET_OS_WATCHOS == 1 + arch_32.GetTriple().setOS(llvm::Triple::WatchOS); + arch_64.GetTriple().setOS(llvm::Triple::WatchOS); #else arch_32.GetTriple().setOS(llvm::Triple::IOS); arch_64.GetTriple().setOS(llvm::Triple::IOS); |