public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tejohnson at google dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/55734] [4.8 Regression] gcov-io.c uses builtins not available in non-GCC compilers Date: Wed, 19 Dec 2012 17:35:00 -0000 [thread overview] Message-ID: <bug-55734-4-FzQMKKicIW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55734-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55734 --- Comment #21 from Teresa Johnson <tejohnson at google dot com> 2012-12-19 17:35:08 UTC --- On Wed, Dec 19, 2012 at 8:48 AM, jakub at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55734 > > --- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-19 16:48:00 UTC --- > Perhaps > if (v > 0) > { > #if IN_LIBGCOV > r = 63 - __builtin_clzll (v); > #else > if (sizeof (v) <= sizeof (HOST_WIDE_INT)) > r = floor_log2 (v); > else if (sizeof (v) == 2 * sizeof (HOST_WIDE_INT)) > { > r = v >> HOST_BITS_PER_WIDE_INT; > if (r) > r = floor_log2 (r) + HOST_BITS_PER_WIDE_INT; > else > r = floor_log2 (v); > } > else > gcc_unreachable (); > #endif > } Also, I have changed the runtime size checks into preprocessor checks, both to increase the speed and also to avoid compile-time errors about shifting by the size of the variable (on v >> HOST_BITS_PER_WIDE_INT). Thanks, Teresa > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are on the CC list for the bug. -- Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
next prev parent reply other threads:[~2012-12-19 17:35 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-18 15:33 [Bug gcov-profile/55734] New: " aldyh at gcc dot gnu.org 2012-12-18 15:38 ` [Bug gcov-profile/55734] [4.8 Regression] " rguenth at gcc dot gnu.org 2012-12-18 15:45 ` aldyh at gcc dot gnu.org 2012-12-18 15:49 ` tejohnson at google dot com 2012-12-18 15:53 ` rguenth at gcc dot gnu.org 2012-12-18 15:54 ` rguenth at gcc dot gnu.org 2012-12-18 16:19 ` aldyh at gcc dot gnu.org 2012-12-18 16:24 ` tejohnson at google dot com 2012-12-18 16:26 ` aldyh at gcc dot gnu.org 2012-12-18 16:31 ` tejohnson at google dot com 2012-12-18 16:49 ` aldyh at redhat dot com 2012-12-18 22:41 ` aldyh at gcc dot gnu.org 2012-12-18 22:49 ` tejohnson at google dot com 2012-12-19 6:50 ` tejohnson at google dot com 2012-12-19 9:43 ` rguenth at gcc dot gnu.org 2012-12-19 13:07 ` rguenth at gcc dot gnu.org 2012-12-19 15:08 ` tejohnson at google dot com 2012-12-19 16:40 ` jakub at gcc dot gnu.org 2012-12-19 16:48 ` jakub at gcc dot gnu.org 2012-12-19 16:58 ` jakub at gcc dot gnu.org 2012-12-19 17:08 ` tejohnson at google dot com 2012-12-19 17:35 ` tejohnson at google dot com [this message] 2012-12-20 14:31 ` tejohnson at gcc dot gnu.org 2012-12-20 14:56 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-55734-4-FzQMKKicIW@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).