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 | 7d7dcd52db479f122c2080600641064176fb8d43 (patch) | |
tree | 145aaffdac7eb3f92adc23b8f311f3a13709c6c1 /llvm/lib/ExecutionEngine/JIT | |
parent | a02e2f991b278885fd799a1486d84c4d1d7a70fc (diff) | |
download | bcm5719-llvm-7d7dcd52db479f122c2080600641064176fb8d43.tar.gz bcm5719-llvm-7d7dcd52db479f122c2080600641064176fb8d43.zip |
Provide generic hooks for icache invalidation. Add PPC implementation.
Patch by Gary Benson!
llvm-svn: 52418
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 422022af9ca..c55bc75560c 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/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(), |