Skip to content

Commit 644a811

Browse files
committed
target/sh4: Move has_work() from CPUClass to SysemuCPUOps
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent f54c047 commit 644a811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target/sh4/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ static bool superh_io_recompile_replay_branch(CPUState *cs,
8282
}
8383
return false;
8484
}
85-
#endif
8685

8786
static bool superh_cpu_has_work(CPUState *cs)
8887
{
8988
return cs->interrupt_request & CPU_INTERRUPT_HARD;
9089
}
90+
#endif /* !CONFIG_USER_ONLY */
9191

9292
static int sh4_cpu_mmu_index(CPUState *cs, bool ifetch)
9393
{
@@ -254,6 +254,7 @@ static const VMStateDescription vmstate_sh_cpu = {
254254
#include "hw/core/sysemu-cpu-ops.h"
255255

256256
static const struct SysemuCPUOps sh4_sysemu_ops = {
257+
.has_work = superh_cpu_has_work,
257258
.get_phys_page_debug = superh_cpu_get_phys_page_debug,
258259
};
259260
#endif
@@ -290,7 +291,6 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data)
290291
&scc->parent_phases);
291292

292293
cc->class_by_name = superh_cpu_class_by_name;
293-
cc->has_work = superh_cpu_has_work;
294294
cc->mmu_index = sh4_cpu_mmu_index;
295295
cc->dump_state = superh_cpu_dump_state;
296296
cc->set_pc = superh_cpu_set_pc;

0 commit comments

Comments
 (0)