JITEmitter.cpp was trying to sync the icache for function stubs, but

was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct 
size), just make the target sync its own stubs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-01-25 16:41:09 +00:00
parent a095db13bf
commit 1910e2f3ec
2 changed files with 19 additions and 10 deletions

View File

@@ -182,10 +182,6 @@ void *JITResolver::getFunctionStub(Function *F) {
TheJIT->updateGlobalMapping(F, Stub);
}
// Invalidate the icache if necessary.
synchronizeICache(Stub, TheJIT->getCodeEmitter()->getCurrentPCValue() -
(intptr_t)Stub);
DOUT << "JIT: Stub emitted at [" << Stub << "] for function '"
<< F->getName() << "'\n";
@@ -224,10 +220,6 @@ void *JITResolver::getExternalFunctionStub(void *FnAddr) {
Stub = TheJIT->getJITInfo().emitFunctionStub(FnAddr,
*TheJIT->getCodeEmitter());
// Invalidate the icache if necessary.
synchronizeICache(Stub, TheJIT->getCodeEmitter()->getCurrentPCValue() -
(intptr_t)Stub);
DOUT << "JIT: Stub emitted at [" << Stub
<< "] for external function at '" << FnAddr << "'\n";
return Stub;