From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL v2 4/9] tcg-sparc: Use ADDXC in setcond_i64
Date: Mon, 29 Sep 2014 12:01:53 -0700 [thread overview]
Message-ID: <1412017318-4331-5-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1412017318-4331-1-git-send-email-rth@twiddle.net>
Similar to the ADDC tricks we use in setcond_i32.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/sparc/tcg-target.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index 3b232d6..d0bd08c 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -716,6 +716,23 @@ static void tcg_out_setcond_i32(TCGContext *s, TCGCond cond, TCGReg ret,
static void tcg_out_setcond_i64(TCGContext *s, TCGCond cond, TCGReg ret,
TCGReg c1, int32_t c2, int c2const)
{
+ if (use_vis3_instructions) {
+ switch (cond) {
+ case TCG_COND_NE:
+ if (c2 != 0) {
+ break;
+ }
+ c2 = c1, c2const = 0, c1 = TCG_REG_G0;
+ /* FALLTHRU */
+ case TCG_COND_LTU:
+ tcg_out_cmp(s, c1, c2, c2const);
+ tcg_out_arith(s, ret, TCG_REG_G0, TCG_REG_G0, ARITH_ADDXC);
+ return;
+ default:
+ break;
+ }
+ }
+
/* For 64-bit signed comparisons vs zero, we can avoid the compare
if the input does not overlap the output. */
if (c2 == 0 && !is_unsigned_cond(cond) && c1 != ret) {
--
1.9.3
next prev parent reply other threads:[~2014-09-29 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 19:01 [Qemu-devel] [PULL v2 0/9] tcg-next queue Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 1/9] tcg-sparc: Support addsub2_i64 Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 2/9] tcg-sparc: Use ADDXC in addsub2_i64 Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 3/9] tcg-sparc: Fix setcond_i32 uninitialized value Richard Henderson
2014-09-29 19:01 ` Richard Henderson [this message]
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 5/9] tcg-sparc: Rename ADDX/SUBX insns Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 6/9] tcg-sparc: Use UMULXHI instruction Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 7/9] tcg-aarch64: Use 32-bit loads for qemu_ld_i32 Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 8/9] qemu/compiler: Define QEMU_ARTIFICIAL Richard Henderson
2014-09-29 19:01 ` [Qemu-devel] [PULL v2 9/9] tcg: Always enable TCGv type checking Richard Henderson
2014-09-30 12:09 ` [Qemu-devel] [PULL v2 0/9] tcg-next queue 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=1412017318-4331-5-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).