mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-23 01:21:01 +00:00
tcg: assign cpu->current_tb in a simpler place
TCG has not been reading cpu->current_tb from signal handlers for years. The code that synchronized cpu_exec with the signal handler is not needed anymore. Backports commit b0a46fa796504c7334202877a68c857e49f7c96c from qemu
This commit is contained in:
parent
96e5a7ced3
commit
1cfd4190a7
|
@ -236,16 +236,12 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
|
|||
next_tb & TB_EXIT_MASK, tb);
|
||||
}
|
||||
|
||||
/* cpu_interrupt might be called while translating the
|
||||
TB, but before it is linked into a potentially
|
||||
infinite loop and becomes env->current_tb. Avoid
|
||||
starting execution if there is a pending interrupt. */
|
||||
cpu->current_tb = tb;
|
||||
barrier();
|
||||
if (likely(!cpu->exit_request)) {
|
||||
tc_ptr = tb->tc_ptr;
|
||||
cpu->current_tb = tb;
|
||||
/* execute the generated code */
|
||||
next_tb = cpu_tb_exec(cpu, tc_ptr); // UNICORN
|
||||
cpu->current_tb = NULL;
|
||||
|
||||
switch (next_tb & TB_EXIT_MASK) {
|
||||
case TB_EXIT_REQUESTED:
|
||||
|
@ -263,7 +259,6 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
|
|||
break;
|
||||
}
|
||||
}
|
||||
cpu->current_tb = NULL;
|
||||
/* reset soft MMU for next block (it can currently
|
||||
only be set by a memory fault) */
|
||||
} /* for(;;) */
|
||||
|
|
Loading…
Reference in a new issue