From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLbAw-0004bY-3e for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:39:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLbAr-0004Yl-1l for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:39:13 -0500 Received: from [199.232.76.173] (port=46960 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLbAq-0004YO-JV for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:39:08 -0500 Received: from mail-pz0-f188.google.com ([209.85.222.188]:51746) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLbAp-0007OY-Nh for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:39:08 -0500 Received: by pzk26 with SMTP id 26so1677722pzk.4 for ; Fri, 18 Dec 2009 03:39:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <761ea48b0912170620l534dcb02m8ea6b59524d76dbe@mail.gmail.com> Date: Fri, 18 Dec 2009 12:39:01 +0100 Message-ID: <761ea48b0912180339x978d80eyfcd1daf5932e97d5@mail.gmail.com> From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 2/6] tcg: Add tcg_invert_cond. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Thu, Dec 17, 2009 at 6:28 PM, Richard Henderson wrote: > It is very handy to have a reliable mapping of a condition to its inverse= . > This will be used in several patches to follow. > > Signed-off-by: Richard Henderson Acked-by: Laurent Desnogues Laurent > --- > =A0tcg/tcg.h | =A0 =A05 +++++ > =A01 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/tcg/tcg.h b/tcg/tcg.h > index 9824493..376d6af 100644 > --- a/tcg/tcg.h > +++ b/tcg/tcg.h > @@ -205,6 +205,11 @@ typedef enum { > =A0 =A0 TCG_COND_GTU, > =A0} TCGCond; > > +static inline TCGCond tcg_invert_cond(TCGCond c) > +{ > + =A0 =A0return (TCGCond)(c ^ 1); > +} > + > =A0#define TEMP_VAL_DEAD =A00 > =A0#define TEMP_VAL_REG =A0 1 > =A0#define TEMP_VAL_MEM =A0 2 > -- > 1.6.5.2 > >