diff options
author | Stefan Brankovic <stefan.brankovic@rt-rk.com> | 2019-07-15 16:22:51 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-08-21 17:17:11 +1000 |
commit | b8313f0d91b192c9415b3c678b387acb77ad112b (patch) | |
tree | 619f26167704f857e461f04d03e39810b7711c13 /target/ppc/int_helper.c | |
parent | 083b3f012fc27536afc74d005d706b20eae200f8 (diff) |
target/ppc: Optimize emulation of vclzd instruction
Optimize Altivec instruction vclzd (Vector Count Leading Zeros Doubleword).
This instruction counts the number of leading zeros of each doubleword element
in source register and places result in the appropriate doubleword element of
destination register.
Using tcg-s count leading zeros instruction two times(once for each
doubleword element of source register vB) and placing result in
appropriate doubleword element of destination register vD.
Signed-off-by: Stefan Brankovic <stefan.brankovic@rt-rk.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <1563200574-11098-6-git-send-email-stefan.brankovic@rt-rk.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/int_helper.c')
-rw-r--r-- | target/ppc/int_helper.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index a265cb07c5..b82765db33 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1820,17 +1820,14 @@ VUPK(lsw, s64, s32, UPKLO) #define clzb(v) ((v) ? clz32((uint32_t)(v) << 24) : 8) #define clzh(v) ((v) ? clz32((uint32_t)(v) << 16) : 16) #define clzw(v) clz32((v)) -#define clzd(v) clz64((v)) VGENERIC_DO(clzb, u8) VGENERIC_DO(clzh, u16) VGENERIC_DO(clzw, u32) -VGENERIC_DO(clzd, u64) #undef clzb #undef clzh #undef clzw -#undef clzd #define ctzb(v) ((v) ? ctz32(v) : 8) #define ctzh(v) ((v) ? ctz32(v) : 16) |