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