diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-04-10 22:08:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-10 22:08:18 +0000 |
commit | 13a7db5b9c4f5e543d037be68ec3428216bfd550 (patch) | |
tree | 1b2c9792582e12f5af0b1512e3094425f0dc0df9 /lib/ExecutionEngine/Orc/OrcTargetSupport.cpp | |
parent | 0eb46f5d1e06a4284663d636a74b06adc3a161d7 (diff) | |
parent | 31195f0bdca6ee2a5e72d07edf13e1d81206d949 (diff) | |
download | external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.zip external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.gz external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.bz2 |
am 31195f0b: Merge "Update aosp/master llvm for rebase to r233350"
* commit '31195f0bdca6ee2a5e72d07edf13e1d81206d949':
Update aosp/master llvm for rebase to r233350
Diffstat (limited to 'lib/ExecutionEngine/Orc/OrcTargetSupport.cpp')
-rw-r--r-- | lib/ExecutionEngine/Orc/OrcTargetSupport.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp b/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp index b5dda8e..6fe5301 100644 --- a/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp +++ b/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp @@ -39,7 +39,7 @@ template <typename OStream> void restoreX86Regs(OStream &OS) { } template <typename TargetT> -uint64_t executeCompileCallback(JITCompileCallbackManagerBase<TargetT> *JCBM, +uint64_t executeCompileCallback(JITCompileCallbackManagerBase *JCBM, TargetAddress CallbackID) { return JCBM->executeCompileCallback(CallbackID); } @@ -52,7 +52,8 @@ namespace orc { const char* OrcX86_64::ResolverBlockName = "orc_resolver_block"; void OrcX86_64::insertResolverBlock( - Module &M, JITCompileCallbackManagerBase<OrcX86_64> &JCBM) { + Module &M, JITCompileCallbackManagerBase &JCBM) { + const unsigned X86_64_TrampolineLength = 6; auto CallbackPtr = executeCompileCallback<OrcX86_64>; uint64_t CallbackAddr = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(CallbackPtr)); @@ -77,6 +78,7 @@ void OrcX86_64::insertResolverBlock( AsmStream << " leaq jit_callback_manager_addr(%rip), %rdi\n" << " movq (%rdi), %rdi\n" << " movq " << ReturnAddrOffset << "(%rsp), %rsi\n" + << " subq $" << X86_64_TrampolineLength << ", %rsi\n" << " movabsq $" << CallbackAddr << ", %rax\n" << " callq *%rax\n" << " movq %rax, " << ReturnAddrOffset << "(%rsp)\n"; |