From f1c28929125400a1680868f7c6eea720de256779 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 12 Sep 2019 10:22:23 +0000 Subject: AArch64: support arm64_32, an ILP32 slice for watchOS. This is the main CodeGen patch to support the arm64_32 watchOS ABI in LLVM. FastISel is mostly disabled for now since it would generate incorrect code for ILP32. llvm-svn: 371722 --- llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 4 +++- llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp | 1 + llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 3 ++- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'llvm/lib/ExecutionEngine') diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index d59a7a6e29f..0295db7633d 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -120,7 +120,8 @@ createLocalCompileCallbackManager(const Triple &T, ExecutionSession &ES, return make_error( std::string("No callback manager available for ") + T.str(), inconvertibleErrorCode()); - case Triple::aarch64: { + case Triple::aarch64: + case Triple::aarch64_32: { typedef orc::LocalJITCompileCallbackManager CCMgrT; return CCMgrT::Create(ES, ErrorHandlerAddress); } @@ -168,6 +169,7 @@ createLocalIndirectStubsManagerBuilder(const Triple &T) { }; case Triple::aarch64: + case Triple::aarch64_32: return [](){ return std::make_unique< orc::LocalIndirectStubsManager>(); diff --git a/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp b/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp index 863698eb725..93aabd817d6 100644 --- a/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp @@ -90,6 +90,7 @@ createLocalLazyCallThroughManager(const Triple &T, ExecutionSession &ES, inconvertibleErrorCode()); case Triple::aarch64: + case Triple::aarch64_32: return LocalLazyCallThroughManager::Create(ES, ErrorHandlerAddr); diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 4b328624ccd..20dccd84803 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -919,7 +919,8 @@ void RuntimeDyldImpl::addRelocationForSymbol(const RelocationEntry &RE, uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr, unsigned AbiVariant) { - if (Arch == Triple::aarch64 || Arch == Triple::aarch64_be) { + if (Arch == Triple::aarch64 || Arch == Triple::aarch64_be || + Arch == Triple::aarch64_32) { // This stub has to be able to access the full address space, // since symbol lookup won't necessarily find a handy, in-range, // PLT stub for functions which could be anywhere. diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index a6a818601c6..9ca76602ea1 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -357,6 +357,8 @@ RuntimeDyldMachO::create(Triple::ArchType Arch, return std::make_unique(MemMgr, Resolver); case Triple::aarch64: return std::make_unique(MemMgr, Resolver); + case Triple::aarch64_32: + return std::make_unique(MemMgr, Resolver); case Triple::x86: return std::make_unique(MemMgr, Resolver); case Triple::x86_64: -- cgit v1.2.3