[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 39/43] target/m68k: Remove EXCP_HALT_INSN
From: |
Richard Henderson |
Subject: |
[PATCH 39/43] target/m68k: Remove EXCP_HALT_INSN |
Date: |
Sat, 30 Apr 2022 06:29:28 -0700 |
Now that semihosting is not attached to EXCP_HALT_INSN,
we can use EXCP_HLT.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/m68k/cpu.h | 1 -
target/m68k/op_helper.c | 5 -----
target/m68k/translate.c | 3 ++-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 60f88e6bc9..f10554318b 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -66,7 +66,6 @@
#define EXCP_MMU_ACCESS 58 /* MMU Access Level Violation Error */
#define EXCP_RTE 0x100
-#define EXCP_HALT_INSN 0x101
#define M68K_DTTR0 0
#define M68K_DTTR1 1
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index a345245612..6218ac791b 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -201,11 +201,6 @@ static void cf_interrupt_all(CPUM68KState *env, int is_hw)
/* Return from an exception. */
cf_rte(env);
return;
- case EXCP_HALT_INSN:
- cs->halted = 1;
- cs->exception_index = EXCP_HLT;
- cpu_loop_exit(cs);
- return;
}
if (cs->exception_index >= EXCP_TRAP0
&& cs->exception_index <= EXCP_TRAP15) {
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 51c546f26f..354a127e1a 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -4736,7 +4736,8 @@ DISAS_INSN(halt)
if (maybe_semihosting(s)) {
return;
}
- gen_exception(s, s->pc, EXCP_HALT_INSN);
+ tcg_gen_movi_i32(cpu_halted, 1);
+ gen_exception(s, s->pc, EXCP_HLT);
}
DISAS_INSN(stop)
--
2.34.1
- [PATCH 17/43] semihosting: Split out common_semi_has_synccache, (continued)
- [PATCH 17/43] semihosting: Split out common_semi_has_synccache, Richard Henderson, 2022/04/30
- [PATCH 13/43] include/exec: Move gdb_stat and gdb_timeval to gdbstub.h, Richard Henderson, 2022/04/30
- [PATCH 25/43] semihosting: Split out semihost_sys_lseek, Richard Henderson, 2022/04/30
- [PATCH 12/43] include/exec: Move gdb open flags to gdbstub.h, Richard Henderson, 2022/04/30
- [PATCH 05/43] semihosting: Add target_strlen for softmmu-uaccess.h, Richard Henderson, 2022/04/30
- [PATCH 20/43] semihosting: Split out semihost_sys_open, Richard Henderson, 2022/04/30
- [PATCH 19/43] semihosting: Move GET_ARG/SET_ARG earlier in the file, Richard Henderson, 2022/04/30
- [PATCH 24/43] semihosting: Bound length for semihost_sys_{read, write}, Richard Henderson, 2022/04/30
- [PATCH 33/43] gdbstub: Widen gdb_syscall_complete_cb return value, Richard Henderson, 2022/04/30
- [PATCH 35/43] target/m68k: Make semihosting system only, Richard Henderson, 2022/04/30
- [PATCH 39/43] target/m68k: Remove EXCP_HALT_INSN,
Richard Henderson <=
- [PATCH 09/43] semihosting: Return void from do_common_semihosting, Richard Henderson, 2022/04/30
- [PATCH 15/43] semihosting: Split is_64bit_semihosting per target, Richard Henderson, 2022/04/30
- [PATCH 14/43] semihosting: Use struct gdb_stat in common_semi_flen_cb, Richard Henderson, 2022/04/30
- [PATCH 22/43] semihosting: Split out semihost_sys_read, Richard Henderson, 2022/04/30
- [PATCH 21/43] semihosting: Split out semihost_sys_close, Richard Henderson, 2022/04/30
- [PATCH 26/43] semihosting: Split out semihost_sys_isatty, Richard Henderson, 2022/04/30
- [PATCH 27/43] semihosting: Split out semihost_sys_flen, Richard Henderson, 2022/04/30
- [PATCH 30/43] semihosting: Split out semihost_sys_system, Richard Henderson, 2022/04/30
- [PATCH 31/43] semihosting: Create semihost_sys_{stat,fstat}, Richard Henderson, 2022/04/30
- [PATCH 38/43] target/m68k: Enable semihosting for non-coldfire, Richard Henderson, 2022/04/30