diff options
author | Richard Henderson <rth@twiddle.net> | 2016-11-21 12:18:53 +0100 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-01-10 08:49:59 -0800 |
commit | 4885c3c49531995d67e54907d01d5aa1350faaaf (patch) | |
tree | 2989af156daa6b59c803809a06dda0b3777906ad /target/i386/ops_sse.h | |
parent | 3253cddd21ab288fa94cb6c8b9ec9fe9a7fcb3e5 (diff) |
target-i386: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/i386/ops_sse.h')
-rw-r--r-- | target/i386/ops_sse.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 7a98f53864..16509d0a74 100644 --- a/target/i386/ops_sse.h +++ b/target/i386/ops_sse.h @@ -2157,32 +2157,6 @@ target_ulong helper_crc32(uint32_t crc1, target_ulong msg, uint32_t len) return crc; } -#define POPMASK(i) ((target_ulong) -1 / ((1LL << (1 << i)) + 1)) -#define POPCOUNT(n, i) ((n & POPMASK(i)) + ((n >> (1 << i)) & POPMASK(i))) -target_ulong helper_popcnt(CPUX86State *env, target_ulong n, uint32_t type) -{ - CC_SRC = n ? 0 : CC_Z; - - n = POPCOUNT(n, 0); - n = POPCOUNT(n, 1); - n = POPCOUNT(n, 2); - n = POPCOUNT(n, 3); - if (type == 1) { - return n & 0xff; - } - - n = POPCOUNT(n, 4); -#ifndef TARGET_X86_64 - return n; -#else - if (type == 2) { - return n & 0xff; - } - - return POPCOUNT(n, 5); -#endif -} - void glue(helper_pclmulqdq, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t ctrl) { |