mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together. Explicitly zero them on reset since they were located before breakpoints. Pass PowerPCCPU to kvmppc_handle_halt(). Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
21317bc222
commit
259186a7d2
70 changed files with 319 additions and 224 deletions
|
@ -42,6 +42,8 @@
|
|||
#undef DEFO64
|
||||
#undef DEFF64
|
||||
|
||||
static TCGv_i32 cpu_halted;
|
||||
|
||||
static TCGv_ptr cpu_env;
|
||||
|
||||
static char cpu_reg_names[3*8*3 + 5*4];
|
||||
|
@ -76,6 +78,10 @@ void m68k_tcg_init(void)
|
|||
#undef DEFO64
|
||||
#undef DEFF64
|
||||
|
||||
cpu_halted = tcg_global_mem_new_i32(TCG_AREG0,
|
||||
-offsetof(M68kCPU, env) +
|
||||
offsetof(CPUState, halted), "HALTED");
|
||||
|
||||
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
|
||||
|
||||
p = cpu_reg_names;
|
||||
|
@ -2024,7 +2030,7 @@ DISAS_INSN(stop)
|
|||
s->pc += 2;
|
||||
|
||||
gen_set_sr_im(s, ext, 0);
|
||||
tcg_gen_movi_i32(QREG_HALTED, 1);
|
||||
tcg_gen_movi_i32(cpu_halted, 1);
|
||||
gen_exception(s, s->pc, EXCP_HLT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue