OSDN Git Service

target/ppc: fix vbpermd in big endian hosts
authorMatheus Ferst <matheus.ferst@eldorado.org.br>
Wed, 1 Jun 2022 12:53:55 +0000 (09:53 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 20 Jun 2022 11:38:58 +0000 (08:38 -0300)
commit8f7d41e0c9cdcb696df564100e77c81ef6a9d026
tree495806f6454a7290755e07a8e2cbf2707a4f593f
parent453eb94c7651e791c3cbc1bbf8880677a61342ca
target/ppc: fix vbpermd in big endian hosts

The extract64 arguments are not endian dependent as they are only used
for bitwise operations. The current behavior in little-endian hosts is
correct; since the indexes in VRB are in PowerISA-ordering, we should
always invert the value before calling extract64. Also, using the VsrD
macro, we can have a single EXTRACT_BIT definition for big and
little-endian with the correct behavior.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220601125355.1266165-1-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
target/ppc/int_helper.c