[PATCH] target/m68k: handle EXCP_SEMIHOSTING in (non-ColdFire) m68k

Matt Jacobson posted 1 patch 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260619073041.92451-1-mhjacobson@me.com
Maintainers: Laurent Vivier <laurent@vivier.eu>
target/m68k/op_helper.c | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] target/m68k: handle EXCP_SEMIHOSTING in (non-ColdFire) m68k
Posted by Matt Jacobson 1 month, 1 week ago
Commit 0815c228bd1 attempted to enable semihosting support for non-
ColdFire m68k.  But in `do_interrupt_all()`, we take a different path
for regular m68k, and that path did not recognize EXCP_SEMIHOSTING.  Fix
that by adding equivalent code to `m68k_interrupt_all()`.

Signed-off-by: Matt Jacobson <mhjacobson@me.com>
---
 target/m68k/op_helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 8148a8852e..be77b8d567 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -305,6 +305,10 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
             /* Return from an exception.  */
             m68k_rte(env);
             return;
+        case EXCP_SEMIHOSTING:
+            do_m68k_semihosting(env, env->dregs[0]);
+            qemu_plugin_vcpu_hostcall_cb(cs, last_pc);
+            return;
         }
     }
 
-- 
2.54.0