qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 05/14] target-ppc: Add ISA 2.06 di


From: Richard Henderson
Subject: Re: [Qemu-ppc] [Qemu-devel] [V3 PATCH 05/14] target-ppc: Add ISA 2.06 divwe[u][o] Instructions
Date: Tue, 24 Dec 2013 07:26:29 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 12/18/2013 12:48 PM, Tom Musta wrote:
> +        tcg_gen_div_i64(cpu_gpr[rD(ctx->opcode)], ra, rb);                   
>  \
> +        tmp0 = tcg_temp_local_new();                                         
>  \
> +        /* does the result fit in 32 bits? */                                
>  \
> +        tcg_gen_ext32s_i64(tmp0, cpu_gpr[rD(ctx->opcode)]);                  
>  \
> +        tcg_gen_brcond_i64(TCG_COND_NE, cpu_gpr[rD(ctx->opcode)], tmp0,      
>  \
> +                           lbl_ov);                                          
>  \
> +        tcg_temp_free(tmp0);                                                 
>  \

tmp0 does not need to be a local temp, as it's not used across basic blocks.

I do wonder if this wouldn't be better as a helper, what with all of the
branches.  TCG essentially won't optimize any of this.


r~



reply via email to

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