mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 14:29:03 +00:00
cpu-exec: Resolve potential compilation errors
We need to pass 'uc' to CPU_GET_CLASS
This commit is contained in:
parent
e9d9ed5eaa
commit
56675f5215
1 changed files with 3 additions and 3 deletions
|
@ -315,7 +315,7 @@ static inline bool cpu_handle_exception(struct uc_struct *uc, CPUState *cpu, int
|
||||||
which will be handled outside the cpu execution
|
which will be handled outside the cpu execution
|
||||||
loop */
|
loop */
|
||||||
#if defined(TARGET_I386)
|
#if defined(TARGET_I386)
|
||||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
CPUClass *cc = CPU_GET_CLASS(uc, cpu);
|
||||||
cc->do_interrupt(cpu);
|
cc->do_interrupt(cpu);
|
||||||
#endif
|
#endif
|
||||||
*ret = cpu->exception_index;
|
*ret = cpu->exception_index;
|
||||||
|
@ -543,8 +543,8 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
|
||||||
cc = CPU_GET_CLASS(uc, cpu);
|
cc = CPU_GET_CLASS(uc, cpu);
|
||||||
#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 == uc->current_cpu);
|
||||||
g_assert(cc == CPU_GET_CLASS(cpu));
|
g_assert(cc == CPU_GET_CLASS(uc, cpu));
|
||||||
#endif /* buggy compiler */
|
#endif /* buggy compiler */
|
||||||
cpu->can_do_io = 1;
|
cpu->can_do_io = 1;
|
||||||
// Unicorn: commented out
|
// Unicorn: commented out
|
||||||
|
|
Loading…
Reference in a new issue