aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2012-12-20 14:31:09 +0000
committerTeresa Johnson <tejohnson@gcc.gnu.org>2012-12-20 14:31:09 +0000
commitd5ae0ba6636d9d5e8b24b0859b860365aa4d943c (patch)
treee5a6383c98a0438b7479e18dbadac925bec0cc5a /libstdc++-v3/src
parent63f2ff0f23d633aad769997ec617ce2177c311ec (diff)
downloadgcc-d5ae0ba6636d9d5e8b24b0859b860365aa4d943c.zip
gcc-d5ae0ba6636d9d5e8b24b0859b860365aa4d943c.tar.gz
gcc-d5ae0ba6636d9d5e8b24b0859b860365aa4d943c.tar.bz2
Fix PR gcov-profile/55734 by using methods from hwint.c instead of builtins...
Fix PR gcov-profile/55734 by using methods from hwint.c instead of builtins, to handle non-GCC and older versions of GCC. When building libgcov.a, however, hwint.c is not available, but we are always using the bootstrapped compiler and can therefore use the builtins. Use __builtin_popcount instead of __builtin_popcountll, since we are operating on an int. Use floor_log2 directly, instead of clz_hwi for the non-libgcov case, and handle situations where the size of the gcov_type is bigger than HOST_WIDE_INT. Verified that the various cases compiled by forcing different HOST_BITS_PER_WIDE_INT values. 2012-12-20 Teresa Johnson <tejohnson@google.com> Jakub Jelinek <jakub@redhat.com> PR gcov-profile/55734 * gcov-io.c (gcov_read_summary): Use __builtin_popcount instead of __builtin_popcountll when building libgcov.a, otherwise use popcount_hwi. (gcov_histo_index): When not building libgcov.a, use floor_log2 instead of __builtin_clzll. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r194634
Diffstat (limited to 'libstdc++-v3/src')
0 files changed, 0 insertions, 0 deletions