target-ppc: Altivec 2.07: Vector Population Count Instructions

This patch adds the Vector Population Count instructions introduced in Power
ISA Version 2.07: vpopcntb, vpopcnth, vpopcntw and vpopcntd.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Tom Musta 2014-02-12 15:23:04 -06:00 committed by Alexander Graf
parent f293f04ab5
commit e13500b3c3
3 changed files with 36 additions and 4 deletions

View file

@ -1549,6 +1549,20 @@ VGENERIC_DO(clzd, u64)
#undef clzw
#undef clzd
#define popcntb(v) ctpop8(v)
#define popcnth(v) ctpop16(v)
#define popcntw(v) ctpop32(v)
#define popcntd(v) ctpop64(v)
VGENERIC_DO(popcntb, u8)
VGENERIC_DO(popcnth, u16)
VGENERIC_DO(popcntw, u32)
VGENERIC_DO(popcntd, u64)
#undef popcntb
#undef popcnth
#undef popcntw
#undef popcntd
#undef VGENERIC_DO