qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 38/43] target/m68k: Enable semihosting for non-coldfire


From: Richard Henderson
Subject: [PATCH 38/43] target/m68k: Enable semihosting for non-coldfire
Date: Sat, 30 Apr 2022 06:29:27 -0700

The libgloss m68k-semi.txt spec says that bkpt #0 may be
used when the halt insn is not available.  While halt is
available for 68060, continue to support bkpt #0 for all
m68k processors.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/translate.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index b7adc8f53d..51c546f26f 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2775,6 +2775,15 @@ DISAS_INSN(swap)
 
 DISAS_INSN(bkpt)
 {
+#ifndef CONFIG_USER_ONLY
+    /* The non-ColdFire semihosting insn is bkpt #0. */
+    if (!m68k_feature(s->env, M68K_FEATURE_CF_ISA_A)
+        && !IS_USER(s)
+        && (insn & 7) == 0
+        && maybe_semihosting(s)) {
+        return;
+    }
+#endif
     gen_exception(s, s->base.pc_next, EXCP_DEBUG);
 }
 
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]