Bug 969336 - ARM simulator: don't flush icache when icache checking is disabled. r=dougc

This commit is contained in:
Jan de Mooij 2014-02-11 11:08:42 +01:00
parent 5440916c46
commit 1a3d4ee313

View File

@ -991,6 +991,8 @@ AllOnOnePage(uintptr_t start, int size)
static CachePage *
GetCachePage(SimulatorRuntime::ICacheMap &i_cache, void *page)
{
MOZ_ASSERT(Simulator::ICacheCheckingEnabled);
SimulatorRuntime::ICacheMap::AddPtr p = i_cache.lookupForAdd(page);
if (p)
return p->value();
@ -1085,6 +1087,8 @@ Simulator::setLastDebuggerInput(char *input)
void
Simulator::FlushICache(void *start_addr, size_t size)
{
if (!Simulator::ICacheCheckingEnabled)
return;
SimulatorRuntime *srt = Simulator::Current()->srt_;
AutoLockSimulatorRuntime alsr(srt);
js::jit::FlushICache(srt->icache(), start_addr, size);
@ -1173,7 +1177,8 @@ class Redirection
Simulator *sim = Simulator::Current();
SimulatorRuntime *srt = sim->srt_;
next_ = srt->redirection();
FlushICache(srt->icache(), addressOfSwiInstruction(), SimInstruction::kInstrSize);
if (Simulator::ICacheCheckingEnabled)
FlushICache(srt->icache(), addressOfSwiInstruction(), SimInstruction::kInstrSize);
srt->setRedirection(this);
}