mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 13:45:40 +00:00
target-m68k: add addressing modes to neg
Backports commit 227de713e0f4224a82c32991b4e4c4973381426b from qemu
This commit is contained in:
parent
3558b93f11
commit
bc27695926
|
@ -1665,16 +1665,20 @@ DISAS_INSN(move_from_ccr)
|
|||
DISAS_INSN(neg)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv reg;
|
||||
TCGv src1;
|
||||
TCGv dest;
|
||||
TCGv addr;
|
||||
int opsize;
|
||||
|
||||
reg = DREG(insn, 0);
|
||||
src1 = tcg_temp_new(tcg_ctx);
|
||||
tcg_gen_mov_i32(tcg_ctx, src1, reg);
|
||||
tcg_gen_neg_i32(tcg_ctx, reg, src1);
|
||||
gen_update_cc_add(s, reg, src1, OS_LONG);
|
||||
tcg_gen_setcondi_i32(tcg_ctx, TCG_COND_NE, tcg_ctx->QREG_CC_X, src1, 0);
|
||||
set_cc_op(s, CC_OP_SUBL);
|
||||
opsize = insn_opsize(insn);
|
||||
SRC_EA(env, src1, opsize, 1, &addr);
|
||||
dest = tcg_temp_new(tcg_ctx);
|
||||
tcg_gen_neg_i32(tcg_ctx, dest, src1);
|
||||
set_cc_op(s, CC_OP_SUBB + opsize);
|
||||
gen_update_cc_add(s, dest, src1, opsize);
|
||||
tcg_gen_setcondi_i32(tcg_ctx, TCG_COND_NE, tcg_ctx->QREG_CC_X, dest, 0);
|
||||
DEST_EA(env, insn, opsize, dest, &addr);
|
||||
tcg_temp_free(tcg_ctx, dest);
|
||||
}
|
||||
|
||||
static void gen_set_sr_im(DisasContext *s, uint16_t val, int ccr_only)
|
||||
|
|
Loading…
Reference in a new issue