diff mbox

[07/52] target-m68k: add bkpt instruction

Message ID 1462392752-17703-8-git-send-email-laurent@vivier.eu
State New
Headers show

Commit Message

Laurent Vivier May 4, 2016, 8:11 p.m. UTC
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target-m68k/translate.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Richard Henderson May 6, 2016, 4:42 p.m. UTC | #1
On 05/04/2016 10:11 AM, Laurent Vivier wrote:
> +    INSN(bkpt,      4848, fff8, M68000);

Do we care that this comes in with 68010 not 68000?

Otherwise,

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~
Laurent Vivier May 7, 2016, 7:08 a.m. UTC | #2
Le 06/05/2016 à 18:42, Richard Henderson a écrit :
> On 05/04/2016 10:11 AM, Laurent Vivier wrote:
>> +    INSN(bkpt,      4848, fff8, M68000);
> 
> Do we care that this comes in with 68010 not 68000?

Yes, you're right: I'm adding M68K_FEATURE_BKPT to enable it only on 68010+

> Otherwise,
> 
> Reviewed-by: Richard Henderson <rth@twiddle.net>
> 
> 
> r~
> 
Thanks,
Laurent
diff mbox

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index bad07a5..e2555f6 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1441,6 +1441,11 @@  DISAS_INSN(swap)
     gen_logic_cc(s, reg);
 }
 
+DISAS_INSN(bkpt)
+{
+    gen_exception(s, s->pc - 2, EXCP_DEBUG);
+}
+
 DISAS_INSN(pea)
 {
     TCGv tmp;
@@ -2894,6 +2899,7 @@  void register_m68k_insns (CPUM68KState *env)
     INSN(move_to_sr, 46c0, ffc0, CF_ISA_A);
     BASE(pea,       4840, ffc0);
     BASE(swap,      4840, fff8);
+    INSN(bkpt,      4848, fff8, M68000);
     BASE(movem,     48c0, fbc0);
     BASE(ext,       4880, fff8);
     BASE(ext,       48c0, fff8);