mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 14:08:15 +00:00
flush JIT cache before finishing emulation. this fixes issue #263. TODO: optimize this for better performance
This commit is contained in:
parent
1ba39a582c
commit
9099755ca1
1 changed files with 5 additions and 0 deletions
|
@ -271,6 +271,11 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
|
|||
|
||||
cc->cpu_exec_exit(cpu);
|
||||
|
||||
// Unicorn: flush JIT cache to because emulation might stop in
|
||||
// the middle of translation, thus generate incomplete code.
|
||||
// TODO: optimize this for better performance
|
||||
tb_flush(env);
|
||||
|
||||
/* fail safe : never use current_cpu outside cpu_exec() */
|
||||
uc->current_cpu = NULL;
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue