diff options
| author | tejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-20 14:31:09 +0000 |
|---|---|---|
| committer | tejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-20 14:31:09 +0000 |
| commit | 960a9b56d6ddfdfa9f6ec747b263e8a6dec80bcd (patch) | |
| tree | e5a6383c98a0438b7479e18dbadac925bec0cc5a /libjava/classpath/java | |
| parent | 91adfb467d1ca86a9b1a9ef6856b27f6f2f8b1ec (diff) | |
| download | ppe42-gcc-960a9b56d6ddfdfa9f6ec747b263e8a6dec80bcd.tar.gz ppe42-gcc-960a9b56d6ddfdfa9f6ec747b263e8a6dec80bcd.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java')
0 files changed, 0 insertions, 0 deletions

