From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
Thomas Huth <huth@tuxfamily.org>,
Michael Tokarev <mjt@tls.msk.ru>,
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Subject: [Qemu-devel] [PULL 1/4] m68k: fix subx mem, mem instruction
Date: Tue, 1 May 2018 15:55:44 +0200 [thread overview]
Message-ID: <20180501135547.12414-2-laurent@vivier.eu> (raw)
In-Reply-To: <20180501135547.12414-1-laurent@vivier.eu>
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
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>
---
target/m68k/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 6beaf9ed66..e407ba2db3 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);
--
2.14.3
next prev parent reply other threads:[~2018-05-01 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 13:55 [Qemu-devel] [PULL 0/4] M68k for 2.13 patches Laurent Vivier
2018-05-01 13:55 ` Laurent Vivier [this message]
2018-05-01 13:55 ` [Qemu-devel] [PULL 2/4] m68k: Fix floatx80_lognp1 (Coverity CID1390587) Laurent Vivier
2018-05-01 13:55 ` [Qemu-devel] [PULL 3/4] m68k: remove dead code (Coverity CID1390617) Laurent Vivier
2018-05-01 13:55 ` [Qemu-devel] [PULL 4/4] hw/m68k/mcf5208: Fix trivial typo in board description Laurent Vivier
2018-05-01 15:30 ` [Qemu-devel] [PULL 0/4] M68k for 2.13 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180501135547.12414-2-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=huth@tuxfamily.org \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).