qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 21/52] tcg: Use offsets not indices for TCGv_


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH v7 21/52] tcg: Use offsets not indices for TCGv_*
Date: Mon, 23 Oct 2017 13:37:09 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

On Fri, Oct 20, 2017 at 16:19:52 -0700, Richard Henderson wrote:
> Using the offset of a temporary, relative to TCGContext, rather than
> its index means that we don't use 0.  That leaves offset 0 free for
> a NULL representation without having to leave index 0 unused.
> 
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  tcg/tcg.h | 37 ++++++++++++++++++++-----------------
>  1 file changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/tcg/tcg.h b/tcg/tcg.h
> index 8f692bc6cf..7fe0fb9e07 100644
> --- a/tcg/tcg.h
> +++ b/tcg/tcg.h
> @@ -429,13 +429,13 @@ typedef TCGv_ptr TCGv_env;
>  #endif
(snip)
>  /* used to align parameters */
> -#define TCG_CALL_DUMMY_ARG      ((TCGArg)(-1))
> +#define TCG_CALL_DUMMY_ARG      ((TCGArg)0)

We're doing something clever here (on a first read I thought TCGContext
was a typo), so I'd leave a comment somewhere. TCG_CALL_DUMMY_ARG might
be a good place to do so; a copy of the commit's message should suffice.

Reviewed-by: Emilio G. Cota <address@hidden>

                E.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]