From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11168 invoked by alias); 18 Dec 2012 15:54:13 -0000 Received: (qmail 11015 invoked by uid 48); 18 Dec 2012 15:53:43 -0000 From: "rguenth at gcc dot 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: Tue, 18 Dec 2012 15:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Keywords: build X-Bugzilla-Severity: blocker X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01777.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55734 --- Comment #5 from Richard Biener 2012-12-18 15:53:42 UTC --- (In reply to comment #4) > (In reply to comment #3) > > In that thread, I had asked: > > > > --- > > If you prefer, I can simply inline the popcount/clz functionality into > > gcov-io.c directly (or at least when not using recent versions of > > GCC). But that in fact would be duplicating the code, when I thought > > Aldy's solution was trying to avoid that by providing the more general > > interfaces. > > > > Teresa > > --- > > > > but didn't get a response. Richard, is that your preferred route for > > fixing this issue? > > We already have popcount_hwi and clz_hwi available. Can't you piggy-back > on that to provide (inline in gcov-io.c) popcountll and clzll? Why do > you need the long long variants anyway? You don't seem to: unsigned histo_bitvector[GCOV_HISTOGRAM_BITVECTOR_SIZE]; ... h_cnt += __builtin_popcountll (histo_bitvector[bv_ix]); so just use popcount_hwi.