[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] tcg: Always enable TCGv type checking
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] tcg: Always enable TCGv type checking |
Date: |
Tue, 16 Sep 2014 11:06:47 -0700 |
On 16 September 2014 10:46, Richard Henderson <address@hidden> wrote:
> Instead of using structures, which imply some amount of overhead
> on certain ABIs, use pointer types.
>
> This actually reduces the size of the binaries vs a NON-debug
> build on ppc64 and x86_64, due to a reduction in the number of
> sign-extension insns.
It's good to have this typechecking enabled unconditionally.
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> tcg/tcg.h | 89
> ++++++++++++++++++++++++---------------------------------------
> 1 file changed, 34 insertions(+), 55 deletions(-)
>
> diff --git a/tcg/tcg.h b/tcg/tcg.h
> index 997a704..7285f71 100644
> --- a/tcg/tcg.h
> +++ b/tcg/tcg.h
> @@ -274,75 +274,54 @@ typedef enum TCGMemOp {
>
> typedef tcg_target_ulong TCGArg;
>
> -/* Define a type and accessor macros for variables. Using a struct is
> - nice because it gives some level of type safely. Ideally the compiler
> - be able to see through all this. However in practice this is not true,
> - especially on targets with braindamaged ABIs (e.g. i386).
> - We use plain int by default to avoid this runtime overhead.
> - Users of tcg_gen_* don't need to know about any of this, and should
> - treat TCGv as an opaque type.
> +/* Define a type and accessor macros for variables. Using pointer types
> + is nice because it gives some level of type safely. Converting to and
"safety".
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
-- PMM