From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <huth@tuxfamily.org>,
rth@twiddle.net, Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH v3 3/5] target-m68k: manage pre-dec et post-inc in CAS
Date: Fri, 13 Jan 2017 19:36:31 +0100 [thread overview]
Message-ID: <1484332593-16782-4-git-send-email-laurent@vivier.eu> (raw)
In-Reply-To: <1484332593-16782-1-git-send-email-laurent@vivier.eu>
In these cases we must update the address register after
the operation.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
---
target/m68k/translate.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 0e97900..23e2b06 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -1963,6 +1963,15 @@ DISAS_INSN(cas)
gen_partset_reg(opsize, DREG(ext, 0), load);
tcg_temp_free(load);
+
+ switch (extract32(insn, 3, 3)) {
+ case 3: /* Indirect postincrement. */
+ tcg_gen_addi_i32(AREG(insn, 0), addr, opsize_bytes(opsize));
+ break;
+ case 4: /* Indirect predecrememnt. */
+ tcg_gen_mov_i32(AREG(insn, 0), addr);
+ break;
+ }
}
DISAS_INSN(cas2w)
--
2.7.4
next prev parent reply other threads:[~2017-01-13 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 18:36 [Qemu-devel] [PATCH v3 0/5] Fixes for target/m68k Laurent Vivier
2017-01-13 18:36 ` [Qemu-devel] [PATCH v3 1/5] target-m68k: fix bit operation with immediate value Laurent Vivier
2017-01-13 18:36 ` [Qemu-devel] [PATCH v3 2/5] target-m68k: fix gen_flush_flags() Laurent Vivier
2017-01-13 18:36 ` Laurent Vivier [this message]
2017-01-13 18:36 ` [Qemu-devel] [PATCH v3 4/5] target-m68k: CAS doesn't need aligned access Laurent Vivier
2017-01-13 18:36 ` [Qemu-devel] [PATCH v3 5/5] target-m68k: increment/decrement with SP Laurent Vivier
2017-01-13 20:08 ` Richard Henderson
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=1484332593-16782-4-git-send-email-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=huth@tuxfamily.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).