target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec
commit611bc69bf6bc6b23e91e4798c036b941c9958b40
authorLucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Wed, 19 Oct 2022 12:50:31 +0000 (19 09:50 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 28 Oct 2022 16:15:22 +0000 (28 13:15 -0300)
tree33d07bc1d020df4429a9a222086b726bc930db97
parent306e4753354378213eddf6f4e6335ffc68186d1f
target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec

This patch moves VADDCUW and VSUBCUW to decodtree with gvec using an
implementation based on the helper, with the main difference being
changing the -1 (aka all bits set to 1) result returned by cmp when
true to +1. It also implemented a .fni4 version of those instructions
and dropped the helper.

vaddcuw:
rept    loop    master             patch
8       12500   0,01008200         0,00612400 (-39.3%)
25      4000    0,01091500         0,00471600 (-56.8%)
100     1000    0,01332500         0,00593700 (-55.4%)
500     200     0,01998500         0,01275700 (-36.2%)
2500    40      0,04704300         0,04364300 (-7.2%)
8000    12      0,10748200         0,11241000 (+4.6%)

vsubcuw:
rept    loop    master             patch
8       12500   0,01226200         0,00571600 (-53.4%)
25      4000    0,01493500         0,00462100 (-69.1%)
100     1000    0,01522700         0,00455100 (-70.1%)
500     200     0,02384600         0,01133500 (-52.5%)
2500    40      0,04935200         0,03178100 (-35.6%)
8000    12      0,09039900         0,09440600 (+4.4%)

Overall there was a gain in performance, but the TCGop code was still
slightly bigger in the new version (it went from 4 to 5).

Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221019125040.48028-4-lucas.araujo@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
target/ppc/helper.h
target/ppc/insn32.decode
target/ppc/int_helper.c
target/ppc/translate/vmx-impl.c.inc
target/ppc/translate/vmx-ops.c.inc