Patchwork [095/111] m68k: add bkpt instruction

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:53 p.m.
Message ID <1313614410-29359-6-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110357/
State New
Headers show

Comments

Bryce Lanham - Aug. 17, 2011, 8:53 p.m.
From: Laurent Vivier <laurent@vivier.eu>

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target-m68k/translate.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 8cb2728..0a14597 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2045,6 +2045,11 @@  DISAS_INSN(swap)
     gen_logic_cc(s, reg, OS_LONG);
 }
 
+DISAS_INSN(bkpt)
+{
+    gen_exception(s, s->pc - 2, EXCP_DEBUG);
+}
+
 DISAS_INSN(pea)
 {
     TCGv tmp;
@@ -4403,6 +4408,7 @@  void register_m68k_insns (CPUM68KState *env)
     INSN(pea,       4840, ffc0, M68000);
     INSN(swap,      4840, fff8, CF_ISA_A);
     INSN(swap,      4840, fff8, M68000);
+    INSN(bkpt,      4848, fff8, M68000);
     INSN(movem,     48c0, fbc0, CF_ISA_A);
     INSN(movem,     48c0, fbc0, M68000);
     INSN(ext,       4880, fff8, CF_ISA_A);