Commit eed152bba588001550eb6a54366aee89f087f1bf
1 parent
2f96c28d
Use shared ctpop64 helper
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3468 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
6 deletions
target-sparc/op_helper.c
1 | 1 | #include "exec.h" |
2 | +#include "host-utils.h" | |
2 | 3 | |
3 | 4 | //#define DEBUG_PCALL |
4 | 5 | //#define DEBUG_MMU |
... | ... | @@ -1469,12 +1470,7 @@ void do_rdpsr() |
1469 | 1470 | |
1470 | 1471 | void do_popc() |
1471 | 1472 | { |
1472 | - T0 = (T1 & 0x5555555555555555ULL) + ((T1 >> 1) & 0x5555555555555555ULL); | |
1473 | - T0 = (T0 & 0x3333333333333333ULL) + ((T0 >> 2) & 0x3333333333333333ULL); | |
1474 | - T0 = (T0 & 0x0f0f0f0f0f0f0f0fULL) + ((T0 >> 4) & 0x0f0f0f0f0f0f0f0fULL); | |
1475 | - T0 = (T0 & 0x00ff00ff00ff00ffULL) + ((T0 >> 8) & 0x00ff00ff00ff00ffULL); | |
1476 | - T0 = (T0 & 0x0000ffff0000ffffULL) + ((T0 >> 16) & 0x0000ffff0000ffffULL); | |
1477 | - T0 = (T0 & 0x00000000ffffffffULL) + ((T0 >> 32) & 0x00000000ffffffffULL); | |
1473 | + T0 = ctpop64(T1); | |
1478 | 1474 | } |
1479 | 1475 | |
1480 | 1476 | static inline uint64_t *get_gregset(uint64_t pstate) | ... | ... |