mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target-xtensa: Move TCG initialization to XtensaCPU initfn
Combine this with breakpoint handler registration, guarding both with tcg_enabled() to suppress also TCG init for qtest. Rename the handler to xtensa_breakpoint_handler() since it needs to become global. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
d9c27f00b1
commit
25733eada6
3 changed files with 9 additions and 13 deletions
|
@ -71,8 +71,15 @@ static void xtensa_cpu_initfn(Object *obj)
|
|||
{
|
||||
XtensaCPU *cpu = XTENSA_CPU(obj);
|
||||
CPUXtensaState *env = &cpu->env;
|
||||
static bool tcg_inited;
|
||||
|
||||
cpu_exec_init(env);
|
||||
|
||||
if (tcg_enabled() && !tcg_inited) {
|
||||
tcg_inited = true;
|
||||
xtensa_translate_init();
|
||||
cpu_set_debug_excp_handler(xtensa_breakpoint_handler);
|
||||
}
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_xtensa_cpu = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue