qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v4 5/8] target/ppc: Implemented xvf16ger*


From: Lucas Mateus Martins Araujo e Castro
Subject: Re: [PATCH v4 5/8] target/ppc: Implemented xvf16ger*
Date: Fri, 20 May 2022 13:42:30 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1


On 20/05/2022 12:47, Richard Henderson wrote:

On 5/20/22 06:51, Lucas Mateus Castro(alqotel) wrote:
+                if (acc) {
+                    aux_acc = at[i].VsrSF(j);
+                    if (!neg_mul && !neg_acc) {
+                        r = float32_add(r, aux_acc, excp_ptr);
+                    } else if (!neg_mul) {
+                        r = float32_add(r, bfp32_neg(aux_acc), excp_ptr);
+                    } else if (!neg_acc) {
+                        r = float32_add(bfp32_neg(r), aux_acc, excp_ptr);
+                    } else {
+                        r = float32_add(bfp32_neg(r), bfp32_neg(aux_acc), excp_ptr);
+                    }

There's no point in the 3 if's when using bfp32_neg.
Just use

  if (neg_mul) {
  }
  if (neg_acc) {
  }
  float32_add(...);

You mean negate separately? Like:

    if (neg_mul) {
        r = bfp32_neg(r);
    }
    if (neg_acc) {
        aux_acc = bfp32_neg(aux_acc);
    }
    r = float32_add(r, aux_acc, excp_ptr);

If so I'll send a new version with this change later today


With that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
--
Lucas Mateus M. Araujo e Castro
Instituto de Pesquisas ELDORADO
Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer

reply via email to

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