[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 12/73] m68k: convert to helper_cpu_halted_set
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v7 12/73] m68k: convert to helper_cpu_halted_set |
Date: |
Mon, 4 Mar 2019 13:17:12 -0500 |
Cc: Laurent Vivier <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
---
target/m68k/translate.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 6217a683f1..aa3237999f 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -43,7 +43,6 @@
#undef DEFO32
#undef DEFO64
-static TCGv_i32 cpu_halted;
static TCGv_i32 cpu_exception_index;
static char cpu_reg_names[2 * 8 * 3 + 5 * 4];
@@ -79,9 +78,6 @@ void m68k_tcg_init(void)
#undef DEFO32
#undef DEFO64
- cpu_halted = tcg_global_mem_new_i32(cpu_env,
- -offsetof(M68kCPU, env) +
- offsetof(CPUState, halted), "HALTED");
cpu_exception_index = tcg_global_mem_new_i32(cpu_env,
-offsetof(M68kCPU, env) +
offsetof(CPUState,
exception_index),
@@ -4637,6 +4633,7 @@ DISAS_INSN(halt)
DISAS_INSN(stop)
{
uint16_t ext;
+ TCGv_i32 tmp;
if (IS_USER(s)) {
gen_exception(s, s->base.pc_next, EXCP_PRIVILEGE);
@@ -4646,7 +4643,9 @@ DISAS_INSN(stop)
ext = read_im16(env, s);
gen_set_sr_im(s, ext, 0);
- tcg_gen_movi_i32(cpu_halted, 1);
+ tmp = tcg_const_i32(1);
+ gen_helper_cpu_halted_set(cpu_env, tmp);
+ tcg_temp_free_i32(tmp);
gen_exception(s, s->pc, EXCP_HLT);
}
--
2.17.1
- [Qemu-devel] [PATCH v7 04/73] cpu: make qemu_work_cond per-cpu, (continued)
- [Qemu-devel] [PATCH v7 04/73] cpu: make qemu_work_cond per-cpu, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 09/73] ppc: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 07/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 23/73] mips: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 50/73] mips: convert to cpu_interrupt_request, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 03/73] cpu: introduce cpu_mutex_lock/unlock, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 02/73] cpu: rename cpu->work_mutex to cpu->lock, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 11/73] hppa: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 10/73] cris: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 15/73] cpu: define cpu_halted helpers, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 12/73] m68k: convert to helper_cpu_halted_set,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v7 14/73] microblaze: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 16/73] tcg-runtime: convert to cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 21/73] lm32: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 20/73] i386: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 64/73] mips: convert to cpu_has_work_with_iothread_lock, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 13/73] alpha: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 19/73] sh4: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 28/73] gdbstub: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 24/73] riscv: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 26/73] sparc: convert to cpu_halted, Emilio G. Cota, 2019/03/04