qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions
Date: Thu, 24 Oct 2013 13:38:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/24/2013 09:25 AM, Tom Musta wrote:
>                                                \
> +            ft0 = tp##_to_##btp(xa.fld[i], &env->fp_status);                 
>  \
> +            ft1 = tp##_to_##btp(m->fld[i], &env->fp_status);                 
>  \
> +            ft0 = btp##_mul(ft0, ft1, &env->fp_status);                      
>  \
> +            if (unlikely(btp##_is_infinity(ft0) &&                           
>  \
> +                         tp##_is_infinity(s->fld[i]) &&                      
>  \
> +                         btp##_is_neg(ft0) cmp tp##_is_neg(s->fld[i]))) {    
>  \
> +                xt.fld[i] = float64_to_##tp(                                 
>  \
> +                              fload_invalid_op_excp(env,                     
>  \
> +                                                     POWERPC_EXCP_FP_VXISI,  
>  \
> +                                                     sfprf),                 
>  \
> +                              &env->fp_status);                              
>  \
> +            } else {                                                         
>  \
> +                ft1 = tp##_to_##btp(s->fld[i], &env->fp_status);             
>  \
> +                ft0 = btp##_##sum(ft0, ft1, &env->fp_status);                
>  \
> +                xt.fld[i] = btp##_to_##tp(ft0, &env->fp_status);             
>  \
> +            }                                                                
>  \
> +            if (neg && likely(!tp##_is_any_nan(xt.fld[i]))) {                
>  \
> +                xt.fld[i] = tp##_chs(xt.fld[i]);                             
>  \
> +            }                  

You want to be using tp##muladd instead of widening to 128 bits.

> +        s = &xt;                                                             
>  \
> +    }                                                                        
>  \
> +    else {                                                                   
>  \
> +        m = &xt;                                                             
>  \ 

Also be careful of the codingstyle.


r~



reply via email to

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