target/ppc: Optimize emulation of vclzw instruction
commit1872588ede5770751ebc0e1df9909c8a785cb549
authorStefan Brankovic <stefan.brankovic@rt-rk.com>
Mon, 15 Jul 2019 14:22:52 +0000 (15 16:22 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 21 Aug 2019 07:17:11 +0000 (21 17:17 +1000)
tree5c81bfb14c7892d735a3448b58c20ffdc354f0f9
parentb8313f0d91b192c9415b3c678b387acb77ad112b
target/ppc: Optimize emulation of vclzw instruction

Optimize Altivec instruction vclzw (Vector Count Leading Zeros Word).
This instruction counts the number of leading zeros of each word element
in source register and places result in the appropriate word element of
destination register.

Counting is to be performed in four iterations of for loop(one for each
word elemnt of source register vB). Every iteration consists of loading
appropriate word element from source register, counting leading zeros
with tcg_gen_clzi_i32, and saving the result in appropriate word element
of destination register.

Signed-off-by: Stefan Brankovic <stefan.brankovic@rt-rk.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <1563200574-11098-7-git-send-email-stefan.brankovic@rt-rk.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/helper.h
target/ppc/int_helper.c
target/ppc/translate/vmx-impl.inc.c