mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-08-04 00:51:11 +00:00
target-m68k: manage pre-dec et post-inc in CAS
In these cases we must update the address register after the operation. Backports commit 308feb935249ad745ef763707e1db69bc10ba789 from qemu
This commit is contained in:
parent
1197d778cc
commit
636bf36272
|
@ -2000,6 +2000,15 @@ DISAS_INSN(cas)
|
||||||
gen_partset_reg(s, opsize, DREG(ext, 0), load);
|
gen_partset_reg(s, opsize, DREG(ext, 0), load);
|
||||||
|
|
||||||
tcg_temp_free(tcg_ctx, load);
|
tcg_temp_free(tcg_ctx, load);
|
||||||
|
|
||||||
|
switch (extract32(insn, 3, 3)) {
|
||||||
|
case 3: /* Indirect postincrement. */
|
||||||
|
tcg_gen_addi_i32(tcg_ctx, AREG(insn, 0), addr, opsize_bytes(opsize));
|
||||||
|
break;
|
||||||
|
case 4: /* Indirect predecrememnt. */
|
||||||
|
tcg_gen_mov_i32(tcg_ctx, AREG(insn, 0), addr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DISAS_INSN(cas2w)
|
DISAS_INSN(cas2w)
|
||||||
|
|
Loading…
Reference in a new issue