From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjIwV-0004Db-9y for qemu-devel@nongnu.org; Thu, 13 Dec 2012 19:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjIwQ-0007MW-E3 for qemu-devel@nongnu.org; Thu, 13 Dec 2012 19:15:55 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49297 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjIwQ-0007MF-3l for qemu-devel@nongnu.org; Thu, 13 Dec 2012 19:15:50 -0500 Message-ID: <50CA6FB2.9010104@suse.de> Date: Fri, 14 Dec 2012 01:15:46 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1354914437-15967-1-git-send-email-rth@twiddle.net> In-Reply-To: <1354914437-15967-1-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, Aurelien Jarno Am 07.12.2012 22:07, schrieb Richard Henderson: > Cc: Aurelien Jarno > Signed-off-by: Richard Henderson Reviewed-by: Andreas F=E4rber Looks fine to me. The only remark I have is that for a use case of mine (writing a new target) I found it helpful to distinguish between tl and i32/i64, which requires static inline functions rather than macros for type safety - but since TCGV_UNUSED() is a macro, too, such changes would be a follow-up. Andreas > --- > tcg/tcg-op.h | 2 ++ > tcg/tcg.h | 3 +++ > 2 files changed, 5 insertions(+) >=20 > Changes since v1: > * Add tl-sized TCGV_IS_UNUSED to tcg-op.h. >=20 >=20 > r~ >=20 >=20 > diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h > index 0b3cb0b..91c9d80 100644 > --- a/tcg/tcg-op.h > +++ b/tcg/tcg-op.h > @@ -2329,6 +2329,7 @@ static inline void tcg_gen_movcond_i64(TCGCond co= nd, TCGv_i64 ret, > #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i32 > #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i32 > #define TCGV_UNUSED(x) TCGV_UNUSED_I32(x) > +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I32(x) > #define TCGV_EQUAL(a, b) TCGV_EQUAL_I32(a, b) > #else > #define TCGv TCGv_i64 > @@ -2340,6 +2341,7 @@ static inline void tcg_gen_movcond_i64(TCGCond co= nd, TCGv_i64 ret, > #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i64 > #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i64 > #define TCGV_UNUSED(x) TCGV_UNUSED_I64(x) > +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I64(x) > #define TCGV_EQUAL(a, b) TCGV_EQUAL_I64(a, b) > #endif > =20 > diff --git a/tcg/tcg.h b/tcg/tcg.h > index 9481e35..90406fc 100644 > --- a/tcg/tcg.h > +++ b/tcg/tcg.h > @@ -270,6 +270,9 @@ typedef int TCGv_i64; > #define TCGV_UNUSED_I32(x) x =3D MAKE_TCGV_I32(-1) > #define TCGV_UNUSED_I64(x) x =3D MAKE_TCGV_I64(-1) > =20 > +#define TCGV_IS_UNUSED_I32(x) (GET_TCGV_I32(x) =3D=3D -1) > +#define TCGV_IS_UNUSED_I64(x) (GET_TCGV_I64(x) =3D=3D -1) > + > /* call flags */ > /* Helper does not read globals (either directly or through an excepti= on). It > implies TCG_CALL_NO_WRITE_GLOBALS. */ >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg