mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-08 01:50:35 +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
|
@ -271,6 +271,11 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
|
||||||
|
|
||||||
cc->cpu_exec_exit(cpu);
|
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() */
|
/* fail safe : never use current_cpu outside cpu_exec() */
|
||||||
uc->current_cpu = NULL;
|
uc->current_cpu = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue