From: "Andreas Färber" <afaerber@suse.de>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_*
Date: Fri, 14 Dec 2012 01:15:46 +0100 [thread overview]
Message-ID: <50CA6FB2.9010104@suse.de> (raw)
In-Reply-To: <1354914437-15967-1-git-send-email-rth@twiddle.net>
Am 07.12.2012 22:07, schrieb Richard Henderson:
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Andreas Färber <afaerber@suse.de>
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(+)
>
> Changes since v1:
> * Add tl-sized TCGV_IS_UNUSED to tcg-op.h.
>
>
> r~
>
>
> 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 cond, 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 cond, 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
>
> 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 = MAKE_TCGV_I32(-1)
> #define TCGV_UNUSED_I64(x) x = MAKE_TCGV_I64(-1)
>
> +#define TCGV_IS_UNUSED_I32(x) (GET_TCGV_I32(x) == -1)
> +#define TCGV_IS_UNUSED_I64(x) (GET_TCGV_I64(x) == -1)
> +
> /* call flags */
> /* Helper does not read globals (either directly or through an exception). It
> implies TCG_CALL_NO_WRITE_GLOBALS. */
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-12-14 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 21:07 [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_* Richard Henderson
2012-12-13 21:04 ` Richard Henderson
2012-12-14 0:15 ` Andreas Färber [this message]
2012-12-28 22:00 ` Richard Henderson
2012-12-29 15:49 ` Blue Swirl
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=50CA6FB2.9010104@suse.de \
--to=afaerber@suse.de \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).