Don't lock armjit memory before aligning code.

This commit is contained in:
Unknown W. Brackets committed 2013-03-14 01:16:28 -07:00
1 parent 710368d143
commit ead6983ad2
2 files changed
+4 -5

No files matched your search

+1 -2
View File
@@ -190,9 +190,7 @@ void ARMXEmitter::SetCodePtr(u8 *ptr)
{
code = ptr;
startcode = code;
#ifdef IOS
lastCacheFlushEnd = ptr;
#endif
}
const u8 *ARMXEmitter::GetCodePtr() const
@@ -236,6 +234,7 @@ void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end)
#elif defined(BLACKBERRY)
msync(start, end - start, MS_SYNC | MS_INVALIDATE_ICACHE);
#elif defined(IOS)
// Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#elif !defined(_WIN32)
__builtin___clear_cache(start, end);
+3 -3
View File
@@ -265,9 +265,6 @@ const u8 *Jit::DoJit(u32 em_address, ArmJitBlock *b)
}
}
#endif
#ifdef IOS
WriteProtect();
#endif
b->codeSize = GetCodePtr() - b->normalEntry;
@@ -278,6 +275,9 @@ const u8 *Jit::DoJit(u32 em_address, ArmJitBlock *b)
}
#endif
AlignCode16();
#ifdef IOS
WriteProtect();
#endif
// Don't forget to zap the instruction cache!
FlushIcache();