From 56675f5215441f250be0cf34ddc7c0e52d74e528 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 12 Mar 2018 14:58:03 -0400 Subject: [PATCH] cpu-exec: Resolve potential compilation errors We need to pass 'uc' to CPU_GET_CLASS --- qemu/cpu-exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu/cpu-exec.c b/qemu/cpu-exec.c index 187112d1..22fe9540 100644 --- a/qemu/cpu-exec.c +++ b/qemu/cpu-exec.c @@ -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 loop */ #if defined(TARGET_I386) - CPUClass *cc = CPU_GET_CLASS(cpu); + CPUClass *cc = CPU_GET_CLASS(uc, cpu); cc->do_interrupt(cpu); #endif *ret = cpu->exception_index; @@ -543,8 +543,8 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu) cc = CPU_GET_CLASS(uc, cpu); #else /* buggy compiler */ /* Assert that the compiler does not smash local variables. */ - g_assert(cpu == current_cpu); - g_assert(cc == CPU_GET_CLASS(cpu)); + g_assert(cpu == uc->current_cpu); + g_assert(cc == CPU_GET_CLASS(uc, cpu)); #endif /* buggy compiler */ cpu->can_do_io = 1; // Unicorn: commented out