| 1223 | } |
| 1224 | |
| 1225 | void* CPU::handleAccessException(DecodedOp* op) { |
| 1226 | if (op->exceptionCount < MAX_OP_EXCEPTION_COUNT) { |
| 1227 | op->exceptionCount++; |
| 1228 | } else if (op->blockStart) { |
| 1229 | U32 eipDistance = 0; |
| 1230 | DecodedOp* nextOp = op->blockStart; |
| 1231 | U32 count = 1; |
| 1232 | |
| 1233 | while (nextOp && nextOp != op && count < MAX_OP_COUNT_PER_BLOCK) { |
| 1234 | eipDistance += nextOp->len; |
| 1235 | nextOp = nextOp->next; |
| 1236 | count++; |
| 1237 | } |
| 1238 | if (nextOp == op) { |
| 1239 | memory->removeCodeBlock(this->eip.u32 - eipDistance, op->blockStart, false); |
| 1240 | } |
| 1241 | } |
| 1242 | runNextSingleOp(); |
| 1243 | return this->thread->process->blockExit; |
| 1244 | } |
| 1245 | #endif |
| 1246 | |
| 1247 | static DecodedOp lastOp; |
no test coverage detected