Fix Yu-Gi-Oh 6 crash with edit card in Android version

This revert part of
74d8a9bdba
This commit is contained in:
sum2012 2015-01-13 22:01:02 +08:00
parent 74640dce11
commit f659e60c8d

View file

@ -409,19 +409,20 @@ void JitBlockCache::LinkBlockExits(int i) {
int destinationBlock = GetBlockNumberFromStartAddress(b.exitAddress[e]);
if (destinationBlock != -1) {
#if defined(ARM)
const u8 *nextExit = b.exitPtrs[e + 1];
if (!nextExit) {
nextExit = b.normalEntry + b.codeSize;
}
//break Yu-Gi-Oh 6 crash with edit card in Android version
//const u8 *nextExit = b.exitPtrs[e + 1];
//if (!nextExit) {
// nextExit = b.normalEntry + b.codeSize;
//}
ARMXEmitter emit(b.exitPtrs[e]);
emit.B(blocks_[destinationBlock].checkedEntry);
u32 op = *((const u32 *)emit.GetCodePtr());
// Overwrite with nops until the next unconditional branch.
while ((op & 0xFF000000) != 0xEA000000) {
emit.BKPT(1);
op = *((const u32 *)emit.GetCodePtr());
}
emit.BKPT(1);
//u32 op = *((const u32 *)emit.GetCodePtr());
//// Overwrite with nops until the next unconditional branch.
//while ((op & 0xFF000000) != 0xEA000000) {
// emit.BKPT(1);
// op = *((const u32 *)emit.GetCodePtr());
//}
//emit.BKPT(1);
emit.FlushIcache();
b.linkStatus[e] = true;
#elif defined(_M_IX86) || defined(_M_X64)