fuzz_arm: Correct unicorn overrun recovery code

This commit is contained in:
Merry 2022-07-14 12:29:47 +01:00
parent 840982be95
commit e9b550de3a

View file

@ -398,9 +398,8 @@ static void RunTestInstance(Dynarmic::A32::Jit& jit,
}
if (uni.GetRegisters()[15] > jit.Regs()[15]) {
const u32 final_pc = jit.Regs()[15];
int trials = 0;
while (final_pc >= initial_pc && final_pc < expected_end_pc && trials++ < 100) {
while (jit.Regs()[15] >= initial_pc && jit.Regs()[15] < expected_end_pc && trials++ < 100 && uni.GetRegisters()[15] != jit.Regs()[15]) {
fmt::print("Warning: Possible unicorn overrrun, attempt recovery\n");
jit.Step();
}