qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tcg_temp_local_new should take no parameter


From: Stuart Brady
Subject: Re: [Qemu-devel] [PATCH] tcg_temp_local_new should take no parameter
Date: Thu, 1 Jan 2009 14:36:49 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Jan 01, 2009 at 02:19:10PM +0100, Laurent Desnogues wrote:
> Index: target-ppc/translate.c
> ===================================================================
> --- target-ppc/translate.c    (revision 6144)
> +++ target-ppc/translate.c    (working copy)
> @@ -6350,7 +6350,7 @@
>      TCGv_i32 t0 = tcg_temp_local_new_i32();                                  
>  \
>      TCGv_i32 t1 = tcg_temp_local_new_i32();                                  
>  \
>      TCGv_i32 t2 = tcg_temp_local_new_i32();                                  
>  \
> -    TCGv_i64 t3 = tcg_temp_local_new(TCG_TYPE_I64);                          
>  \
> +    TCGv_i64 t3 = tcg_temp_local_new();                                      
>  \
>      tcg_gen_trunc_i64_i32(t0, cpu_gpr[rA(ctx->opcode)]);                     
>  \
>      tcg_gen_trunc_i64_i32(t2, cpu_gpr[rB(ctx->opcode)]);                     
>  \
>      tcg_op(t0, t0, t2);                                                      
>  \

Wouldn't tcg_temp_local_new_i64 be a little clearer, as t3 is later 
freed with tcg_temp_free_i64()?

The SH4 emulation seems to use 'plain' TCGv mostly, expects it to be
32-bits, and doesn't use the _tl macros, which I suppose is reasonable 
for a 32-bit only target.

Alpha, ARM and M68K do something similar (so I'll try to follow the
style that they use) but CRIS uses _tl a lot, which seems peculiar...

Cheers,
-- 
Stuart Brady




reply via email to

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