[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 11/73] m68k: convert to helper_cpu_halted_set
From: |
Robert Foley |
Subject: |
[PATCH v10 11/73] m68k: convert to helper_cpu_halted_set |
Date: |
Wed, 17 Jun 2020 17:01:29 -0400 |
From: "Emilio G. Cota" <cota@braap.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Robert Foley <robert.foley@linaro.org>
---
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 3fc67aa452..35086ff449 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -44,7 +44,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];
@@ -80,9 +79,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),
@@ -4698,6 +4694,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);
@@ -4707,7 +4704,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
- [PATCH v10 00/73] per-CPU locks, Robert Foley, 2020/06/17
- [PATCH v10 01/73] cpu: rename cpu->work_mutex to cpu->lock, Robert Foley, 2020/06/17
- [PATCH v10 03/73] cpu: make qemu_work_cond per-cpu, Robert Foley, 2020/06/17
- [PATCH v10 02/73] cpu: introduce cpu_mutex_lock/unlock, Robert Foley, 2020/06/17
- [PATCH v10 04/73] cpu: move run_on_cpu to cpus-common, Robert Foley, 2020/06/17
- [PATCH v10 06/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode, Robert Foley, 2020/06/17
- [PATCH v10 05/73] cpu: introduce process_queued_cpu_work_locked, Robert Foley, 2020/06/17
- [PATCH v10 10/73] hppa: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 11/73] m68k: convert to helper_cpu_halted_set,
Robert Foley <=
- [PATCH v10 07/73] tcg-runtime: define helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 09/73] cris: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 08/73] ppc: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 14/73] cpu: define cpu_halted helpers, Robert Foley, 2020/06/17
- [PATCH v10 12/73] alpha: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 15/73] tcg-runtime: convert to cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 13/73] microblaze: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 17/73] arm: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 16/73] hw/semihosting: convert to cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 18/73] ppc: convert to cpu_halted, Robert Foley, 2020/06/17