What would happen if code forward modifies itself, but that condition evaluates to true?
> #ifdef TARGET_HAS_PRECISE_SMC
> if (current_tb_not_found) {
> current_tb_not_found = 0;
> current_tb = NULL;
> if (cpu->mem_io_pc) {
> /* now we have a real cpu fault */
> current_tb = tb_find_pc(uc, cpu->mem_io_pc);
> }
> }
> if (current_tb == tb &&
> (current_tb->cflags & CF_COUNT_MASK) != 1) {
> /* If we are modifying the current TB, we must stop
> its execution. We could be more precise by checking
> that the modification is after the current PC, but it
> would require a specialized function to partially
> restore the CPU state */
>
> current_tb_modified = 1;
> // self-modifying code will restore state from TB
> cpu_restore_state_from_tb(cpu, current_tb, cpu->mem_io_pc);
> cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base,
> ¤t_flags);
> }
> #endif /* TARGET_HAS_PRECISE_SMC */