diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-28 14:35:04 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-28 14:35:04 +0000 |
commit | eed152bba588001550eb6a54366aee89f087f1bf (patch) | |
tree | 180895bb04cc8b6d634c379a0dd6f8cf4054bd71 | |
parent | 2f96c28d5518944fa3577b09582aa5ae39f8b509 (diff) |
Use shared ctpop64 helper
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3468 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-sparc/op_helper.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 7b1b08e430..ccadf85104 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1,4 +1,5 @@ #include "exec.h" +#include "host-utils.h" //#define DEBUG_PCALL //#define DEBUG_MMU @@ -1469,12 +1470,7 @@ void do_rdpsr() void do_popc() { - T0 = (T1 & 0x5555555555555555ULL) + ((T1 >> 1) & 0x5555555555555555ULL); - T0 = (T0 & 0x3333333333333333ULL) + ((T0 >> 2) & 0x3333333333333333ULL); - T0 = (T0 & 0x0f0f0f0f0f0f0f0fULL) + ((T0 >> 4) & 0x0f0f0f0f0f0f0f0fULL); - T0 = (T0 & 0x00ff00ff00ff00ffULL) + ((T0 >> 8) & 0x00ff00ff00ff00ffULL); - T0 = (T0 & 0x0000ffff0000ffffULL) + ((T0 >> 16) & 0x0000ffff0000ffffULL); - T0 = (T0 & 0x00000000ffffffffULL) + ((T0 >> 32) & 0x00000000ffffffffULL); + T0 = ctpop64(T1); } static inline uint64_t *get_gregset(uint64_t pstate) |