From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NM8SW-0003rS-3V for qemu-devel@nongnu.org; Sat, 19 Dec 2009 18:11:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NM8SV-0003qZ-DE for qemu-devel@nongnu.org; Sat, 19 Dec 2009 18:11:35 -0500 Received: from [199.232.76.173] (port=59211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NM8SV-0003qJ-7Q for qemu-devel@nongnu.org; Sat, 19 Dec 2009 18:11:35 -0500 Received: from hall.aurel32.net ([88.191.82.174]:53762) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NM8SU-0001ls-U0 for qemu-devel@nongnu.org; Sat, 19 Dec 2009 18:11:35 -0500 Date: Sun, 20 Dec 2009 00:11:32 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 4/5] tcg: Add tcg_invert_cond. Message-ID: <20091219231132.GA2177@volta.aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Sat, Dec 19, 2009 at 10:44:52AM -0800, Richard Henderson wrote: > It is very handy to have a reliable mapping of a condition to its inverse. Acked-by: Aurelien Jarno > Signed-off-by: Richard Henderson > --- > tcg/tcg.h | 5 +++++ > 1 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 { > TCG_COND_GTU, > } TCGCond; > > +static inline TCGCond tcg_invert_cond(TCGCond c) > +{ > + return (TCGCond)(c ^ 1); > +} > + > #define TEMP_VAL_DEAD 0 > #define TEMP_VAL_REG 1 > #define TEMP_VAL_MEM 2 > -- > 1.6.5.2 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net