mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 18:46:47 +00:00
m68k: fix subx mem, mem instruction
This patch fixes decrement of the pointers for subx mem, mem instructions. Without the patch pointers are decremented by OS_* constant value instead of retrieving the corresponding data size and using it as a decrement. Backports commit 355d4d1c00e708907ff391c24ca708f1c9c06bf0 from qemu
This commit is contained in:
parent
d3e7bbffea
commit
bf16c6daee
|
@ -3279,11 +3279,11 @@ DISAS_INSN(subx_mem)
|
|||
opsize = insn_opsize(insn);
|
||||
|
||||
addr_src = AREG(insn, 0);
|
||||
tcg_gen_subi_i32(tcg_ctx, addr_src, addr_src, opsize);
|
||||
tcg_gen_subi_i32(tcg_ctx, addr_src, addr_src, opsize_bytes(opsize));
|
||||
src = gen_load(s, opsize, addr_src, 1, IS_USER(s));
|
||||
|
||||
addr_dest = AREG(insn, 9);
|
||||
tcg_gen_subi_i32(tcg_ctx, addr_dest, addr_dest, opsize);
|
||||
tcg_gen_subi_i32(tcg_ctx, addr_dest, addr_dest, opsize_bytes(opsize));
|
||||
dest = gen_load(s, opsize, addr_dest, 1, IS_USER(s));
|
||||
|
||||
gen_subx(s, src, dest, opsize);
|
||||
|
|
Loading…
Reference in a new issue