qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 6/7] tcg: Add tcg_signed_cond
Date: Fri, 15 Dec 2017 11:07:31 -0600	[thread overview]
Message-ID: <20171215170732.31125-7-richard.henderson@linaro.org> (raw)
In-Reply-To: <20171215170732.31125-1-richard.henderson@linaro.org>

Complimenting the existing tcg_unsigned_cond.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tcg/tcg.h b/tcg/tcg.h
index f25efa9795..8c45f7edbc 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -488,6 +488,12 @@ static inline TCGCond tcg_unsigned_cond(TCGCond c)
     return c & 2 ? (TCGCond)(c ^ 6) : c;
 }
 
+/* Create a "signed" version of an "unsigned" comparison.  */
+static inline TCGCond tcg_signed_cond(TCGCond c)
+{
+    return c & 4 ? (TCGCond)(c ^ 6) : c;
+}
+
 /* Must a comparison be considered unsigned?  */
 static inline bool is_unsigned_cond(TCGCond c)
 {
-- 
2.14.3

  parent reply	other threads:[~2017-12-15 17:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 17:07 [Qemu-devel] [PATCH 0/7] TCG misc patches Richard Henderson
2017-12-15 17:07 ` [Qemu-devel] [PATCH 1/7] target/*helper: don't check retaddr before calling cpu_restore_state Richard Henderson
2017-12-15 17:07 ` [Qemu-devel] [PATCH 2/7] target/moxie: Fix tlb_fill Richard Henderson
2017-12-15 17:31   ` Peter Maydell
2017-12-18 18:47     ` Richard Henderson
2017-12-15 17:07 ` [Qemu-devel] [PATCH 3/7] tcg: Remove TCGV_UNUSED* and TCGV_IS_UNUSED* Richard Henderson
2017-12-15 17:58   ` Philippe Mathieu-Daudé
2017-12-15 17:07 ` [Qemu-devel] [PATCH 4/7] tcg: Dynamically allocate TCGOps Richard Henderson
2017-12-15 17:07 ` [Qemu-devel] [PATCH 5/7] tcg: Generalize TCGOp parameters Richard Henderson
2017-12-15 17:59   ` Philippe Mathieu-Daudé
2017-12-15 17:07 ` Richard Henderson [this message]
2017-12-15 17:07 ` [Qemu-devel] [PATCH 7/7] tcg: Allow 6 arguments to TCG helpers Richard Henderson
2017-12-15 18:06   ` Philippe Mathieu-Daudé
2017-12-18 19:20     ` Richard Henderson
2017-12-18 20:39       ` Philippe Mathieu-Daudé
2017-12-15 18:13 ` [Qemu-devel] [PATCH 0/7] TCG misc patches no-reply

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=20171215170732.31125-7-richard.henderson@linaro.org \
    --to=richard.henderson@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).