aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/translate.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-04-18 09:41:53 +0300
committerLaurent Vivier <laurent@vivier.eu>2018-04-30 15:43:54 +0200
commit355d4d1c00e708907ff391c24ca708f1c9c06bf0 (patch)
tree3c0a858685f36aac3a560130ac8e70d22dc7127b /target/m68k/translate.c
parentc2c768500f17fc8cdcfa44d169f089953bb22748 (diff)
downloadqemu-355d4d1c00e708907ff391c24ca708f1c9c06bf0.zip
qemu-355d4d1c00e708907ff391c24ca708f1c9c06bf0.tar.gz
qemu-355d4d1c00e708907ff391c24ca708f1c9c06bf0.tar.bz2
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. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20180418064152.24606.71975.stgit@pasha-VirtualBox> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target/m68k/translate.c')
-rw-r--r--target/m68k/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 6beaf9e..e407ba2 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -3166,11 +3166,11 @@ DISAS_INSN(subx_mem)
opsize = insn_opsize(insn);
addr_src = AREG(insn, 0);
- tcg_gen_subi_i32(addr_src, addr_src, opsize);
+ tcg_gen_subi_i32(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(addr_dest, addr_dest, opsize);
+ tcg_gen_subi_i32(addr_dest, addr_dest, opsize_bytes(opsize));
dest = gen_load(s, opsize, addr_dest, 1, IS_USER(s));
gen_subx(s, src, dest, opsize);