mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-08 22:25:27 +00:00
cpu_common_reset: wrap TCG specific code in tcg_enabled()
Both the cpu->tb_jmp_cache and SoftMMU TLB structures are only used when running TCG code so we might as well skip them for anything else. Backports commit ba7d3d1858c257e39b47f7f12fa2016ffd960b11 from qemu
This commit is contained in:
parent
780ed8722e
commit
7e2cc86ad2
|
@ -172,13 +172,18 @@ static void cpu_common_reset(CPUState *cpu)
|
|||
cpu->exception_index = -1;
|
||||
cpu->crash_occurred = false;
|
||||
|
||||
for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
|
||||
atomic_set(&cpu->tb_jmp_cache[i], NULL);
|
||||
}
|
||||
// TODO: Should be uncommented, but good 'ol
|
||||
// unicorn's crappy symbol deduplication
|
||||
// makes it impossible right now
|
||||
//if (tcg_enabled(cpu->uc)) {
|
||||
for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
|
||||
atomic_set(&cpu->tb_jmp_cache[i], NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
tlb_flush(cpu, 0);
|
||||
tlb_flush(cpu, 0);
|
||||
#endif
|
||||
//}
|
||||
}
|
||||
|
||||
static bool cpu_common_has_work(CPUState *cs)
|
||||
|
|
Loading…
Reference in a new issue