From: Laurent Vivier <laur...@vivier.eu> Allows suba and adda to manage word sized effective address, and attach them to M68000 feature.
Signed-off-by: Andreas Schwab <sch...@linux-m68k.org> Signed-off-by: Laurent Vivier <laur...@vivier.eu> --- target-m68k/translate.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index 74faabf..0321349 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -1881,7 +1881,7 @@ DISAS_INSN(suba) TCGv src; TCGv reg; - SRC_EA(src, OS_LONG, 0, NULL); + SRC_EA(src, (insn & 0x100) ? OS_LONG : OS_WORD, -1, NULL); reg = AREG(insn, 9); tcg_gen_sub_i32(reg, reg, src); } @@ -1991,7 +1991,7 @@ DISAS_INSN(adda) TCGv src; TCGv reg; - SRC_EA(src, OS_LONG, 0, NULL); + SRC_EA(src, (insn & 0x100) ? OS_LONG : OS_WORD, -1, NULL); reg = AREG(insn, 9); tcg_gen_add_i32(reg, reg, src); } @@ -3109,6 +3109,7 @@ void register_m68k_insns (CPUM68KState *env) INSN(subx, 9180, f1f8, CF_ISA_A); INSN(subx, 9100, f138, M68000); INSN(suba, 91c0, f1c0, CF_ISA_A); + INSN(suba, 90c0, f0c0, M68000); INSN(undef_mac, a000, f000, CF_ISA_A); INSN(undef_mac, a000, f000, M68000); @@ -3144,6 +3145,7 @@ void register_m68k_insns (CPUM68KState *env) INSN(addx, d180, f1f8, CF_ISA_A); INSN(addx, d100, f138, M68000); INSN(adda, d1c0, f1c0, CF_ISA_A); + INSN(adda, d0c0, f0c0, M68000); INSN(shift_im, e080, f0f0, CF_ISA_A); INSN(shift_reg, e0a0, f0f0, CF_ISA_A); INSN(shift_im, e080, f0f0, M68000); -- 1.7.2.3