diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-06-17 17:30:05 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-06-17 17:30:05 +0000 |
commit | 210539ebc466521e41e69b119649d59cc721b006 (patch) | |
tree | a97fbc706a4afc590db8ee83ffa3664ebd69c506 /lib/ExecutionEngine | |
parent | fc329f4fa18cf4e7b64c1813041d4895b19fa347 (diff) | |
download | external_llvm-210539ebc466521e41e69b119649d59cc721b006.zip external_llvm-210539ebc466521e41e69b119649d59cc721b006.tar.gz external_llvm-210539ebc466521e41e69b119649d59cc721b006.tar.bz2 |
Provide generic hooks for icache invalidation. Add PPC implementation.
Patch by Gary Benson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 422022a..c55bc75 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -145,20 +145,6 @@ namespace { JITResolver *JITResolver::TheJITResolver = 0; -#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ - defined(__APPLE__) -extern "C" void sys_icache_invalidate(const void *Addr, size_t len); -#endif - -/// synchronizeICache - On some targets, the JIT emitted code must be -/// explicitly refetched to ensure correct execution. -static void synchronizeICache(const void *Addr, size_t len) { -#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ - defined(__APPLE__) - sys_icache_invalidate(Addr, len); -#endif -} - /// getFunctionStub - This returns a pointer to a function stub, creating /// one on demand as needed. void *JITResolver::getFunctionStub(Function *F) { @@ -756,7 +742,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) { } // Invalidate the icache if necessary. - synchronizeICache(FnStart, FnEnd-FnStart); + TheJIT->getJITInfo().InvalidateInstructionCache(FnStart, FnEnd-FnStart); // Add it to the JIT symbol table if the host wants it. AddFunctionToSymbolTable(F.getFunction()->getNameStart(), |