diff options
Diffstat (limited to 'target/xtensa/cpu.c')
-rw-r--r-- | target/xtensa/cpu.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 88a32268a1..e2b2c7a71c 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -181,6 +181,21 @@ static const VMStateDescription vmstate_xtensa_cpu = { .unmigratable = 1, }; +#include "hw/core/tcg-cpu-ops.h" + +static struct TCGCPUOps xtensa_tcg_ops = { + .initialize = xtensa_translate_init, + .cpu_exec_interrupt = xtensa_cpu_exec_interrupt, + .tlb_fill = xtensa_cpu_tlb_fill, + .debug_excp_handler = xtensa_breakpoint_handler, + +#ifndef CONFIG_USER_ONLY + .do_interrupt = xtensa_cpu_do_interrupt, + .do_transaction_failed = xtensa_cpu_do_transaction_failed, + .do_unaligned_access = xtensa_cpu_do_unaligned_access, +#endif /* !CONFIG_USER_ONLY */ +}; + static void xtensa_cpu_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); @@ -194,23 +209,17 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = xtensa_cpu_class_by_name; cc->has_work = xtensa_cpu_has_work; - cc->do_interrupt = xtensa_cpu_do_interrupt; - cc->cpu_exec_interrupt = xtensa_cpu_exec_interrupt; cc->dump_state = xtensa_cpu_dump_state; cc->set_pc = xtensa_cpu_set_pc; cc->gdb_read_register = xtensa_cpu_gdb_read_register; cc->gdb_write_register = xtensa_cpu_gdb_write_register; cc->gdb_stop_before_watchpoint = true; - cc->tlb_fill = xtensa_cpu_tlb_fill; #ifndef CONFIG_USER_ONLY - cc->do_unaligned_access = xtensa_cpu_do_unaligned_access; cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug; - cc->do_transaction_failed = xtensa_cpu_do_transaction_failed; #endif - cc->debug_excp_handler = xtensa_breakpoint_handler; cc->disas_set_info = xtensa_cpu_disas_set_info; - cc->tcg_initialize = xtensa_translate_init; dc->vmsd = &vmstate_xtensa_cpu; + cc->tcg_ops = &xtensa_tcg_ops; } static const TypeInfo xtensa_cpu_type_info = { |