mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-01 13:10:31 +00:00
cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()
Backports commit ba048a4ae15ba0f70c6dcb12ee05db120408de78 from qemu
This commit is contained in:
parent
aefb8935a9
commit
b4b7b88f69
|
@ -354,9 +354,6 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
|
||||||
{
|
{
|
||||||
CPUArchState *env = cpu->env_ptr;
|
CPUArchState *env = cpu->env_ptr;
|
||||||
CPUClass *cc = CPU_GET_CLASS(uc, cpu);
|
CPUClass *cc = CPU_GET_CLASS(uc, cpu);
|
||||||
#ifdef TARGET_I386
|
|
||||||
X86CPU *x86_cpu = X86_CPU(uc, cpu);
|
|
||||||
#endif
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (cpu_handle_halt(cpu)) {
|
if (cpu_handle_halt(cpu)) {
|
||||||
|
@ -410,17 +407,10 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
|
||||||
cpu = uc->current_cpu;
|
cpu = uc->current_cpu;
|
||||||
env = cpu->env_ptr;
|
env = cpu->env_ptr;
|
||||||
cc = CPU_GET_CLASS(uc, cpu);
|
cc = CPU_GET_CLASS(uc, cpu);
|
||||||
#ifdef TARGET_I386
|
|
||||||
x86_cpu = X86_CPU(uc, cpu);
|
|
||||||
#endif
|
|
||||||
#else /* buggy compiler */
|
#else /* buggy compiler */
|
||||||
/* Assert that the compiler does not smash local variables. */
|
/* Assert that the compiler does not smash local variables. */
|
||||||
g_assert(cpu == current_cpu);
|
g_assert(cpu == current_cpu);
|
||||||
g_assert(cc == CPU_GET_CLASS(cpu));
|
g_assert(cc == CPU_GET_CLASS(cpu));
|
||||||
#ifdef TARGET_I386
|
|
||||||
g_assert(x86_cpu == X86_CPU(cpu));
|
|
||||||
g_assert(env == &x86_cpu->env);
|
|
||||||
#endif
|
|
||||||
#endif /* buggy compiler */
|
#endif /* buggy compiler */
|
||||||
cpu->can_do_io = 1;
|
cpu->can_do_io = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue