diff options
author | Edward Smith-Rowland <3dw4rd@verizon.net> | 2013-10-21 13:52:39 +0000 |
---|---|---|
committer | Edward Smith-Rowland <emsr@gcc.gnu.org> | 2013-10-21 13:52:39 +0000 |
commit | 390dafb79d287d5b0f7161c9e3b5c3ed7437f23c (patch) | |
tree | 8a1f27c8e003e564418768187448f6f6f8de268a | |
parent | 0e7504c8a12c11c0693deddc5e7724424a0c2cc5 (diff) | |
download | gcc-390dafb79d287d5b0f7161c9e3b5c3ed7437f23c.zip gcc-390dafb79d287d5b0f7161c9e3b5c3ed7437f23c.tar.gz gcc-390dafb79d287d5b0f7161c9e3b5c3ed7437f23c.tar.bz2 |
re PR libstdc++/58804 (dynamic_bitset<> uses popcountl on long long)
2013-10-20 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/58804
PR libstdc++/58729
* include/tr2/dynamic_bitset
(__dynamic_bitset_base<_WordT, _Alloc>::_M_are_all_aux,
__dynamic_bitset_base<_WordT, _Alloc>::_M_do_count):
Use __builtin_popcountll() instead of __builtin_popcountl().
* include/tr2/dynamic_bitset.tcc
(__dynamic_bitset_base<_WordT, _Alloc>::_M_do_find_first,
__dynamic_bitset_base<_WordT, _Alloc>::_M_do_find_next):
Use __builtin_ctzll() instead of __builtin_ctzl().
From-SVN: r203893
-rw-r--r-- | libstdc++-v3/ChangeLog | 13 | ||||
-rw-r--r-- | libstdc++-v3/include/tr2/dynamic_bitset | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/tr2/dynamic_bitset.tcc | 6 |
3 files changed, 18 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0957953..1a4f6eb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2013-10-21 Edward Smith-Rowland <3dw4rd@verizon.net> + + PR libstdc++/58804 + PR libstdc++/58729 + * include/tr2/dynamic_bitset + (__dynamic_bitset_base<_WordT, _Alloc>::_M_are_all_aux, + __dynamic_bitset_base<_WordT, _Alloc>::_M_do_count): + Use __builtin_popcountll() instead of __builtin_popcountl(). + * include/tr2/dynamic_bitset.tcc + (__dynamic_bitset_base<_WordT, _Alloc>::_M_do_find_first, + __dynamic_bitset_base<_WordT, _Alloc>::_M_do_find_next): + Use __builtin_ctzll() instead of __builtin_ctzl(). + 2013-10-20 Tim Shen <timshen91@gmail.com> * include/bits/regex.h: Remove virtual class _Automaton. diff --git a/libstdc++-v3/include/tr2/dynamic_bitset b/libstdc++-v3/include/tr2/dynamic_bitset index 5cd05f5..7d4d392 100644 --- a/libstdc++-v3/include/tr2/dynamic_bitset +++ b/libstdc++-v3/include/tr2/dynamic_bitset @@ -287,7 +287,7 @@ public: if (_M_w[__i] != ~static_cast<block_type>(0)) return 0; return ((this->_M_w.size() - 1) * _S_bits_per_block - + __builtin_popcountl(this->_M_hiword())); + + __builtin_popcountll(this->_M_hiword())); } bool @@ -332,7 +332,7 @@ public: { size_t __result = 0; for (size_t __i = 0; __i < this->_M_w.size(); ++__i) - __result += __builtin_popcountl(this->_M_w[__i]); + __result += __builtin_popcountll(this->_M_w[__i]); return __result; } diff --git a/libstdc++-v3/include/tr2/dynamic_bitset.tcc b/libstdc++-v3/include/tr2/dynamic_bitset.tcc index 016fdf0..02e647a 100644 --- a/libstdc++-v3/include/tr2/dynamic_bitset.tcc +++ b/libstdc++-v3/include/tr2/dynamic_bitset.tcc @@ -131,7 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _WordT __thisword = this->_M_w[__i]; if (__thisword != static_cast<_WordT>(0)) return (__i * _S_bits_per_block - + __builtin_ctzl(__thisword)); + + __builtin_ctzll(__thisword)); } // not found, so return an indication of failure. return __not_found; @@ -158,7 +158,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__thisword != static_cast<_WordT>(0)) return (__i * _S_bits_per_block - + __builtin_ctzl(__thisword)); + + __builtin_ctzll(__thisword)); // check subsequent words for (++__i; __i < this->_M_w.size(); ++__i) @@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __thisword = this->_M_w[__i]; if (__thisword != static_cast<_WordT>(0)) return (__i * _S_bits_per_block - + __builtin_ctzl(__thisword)); + + __builtin_ctzll(__thisword)); } // not found, so return an indication of failure. return __not_found; |