From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23176 invoked by alias); 4 Dec 2014 19:19:32 -0000 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 Received: (qmail 23127 invoked by uid 48); 4 Dec 2014 19:19:29 -0000 From: "amylaar at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64003] valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md Date: Thu, 04 Dec 2014 19:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amylaar at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: enkovich.gnu at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg00487.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003 Jorn Wolfgang Rennecke changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amylaar at gcc dot gnu.org --- Comment #16 from Jorn Wolfgang Rennecke --- (In reply to Jeffrey A. Law from comment #14) > Is this documented anywhere? I certainly don't recall this restriction, but > it does answer one of the questions I'd been kicking around in my head. I've put a comment into sh.md to that effect - can't put a link to the gcc-cvs archive here because the code is from 1998, but here's an excerpt: ;; ??? This should use something like *branch_p (minus (match_dup 0) (pc)), ;; but getattrtab doesn't understand this. (define_attr "length" "" (cond [(eq_attr "type" "cbranch") (cond [(eq_attr "short_cbranch_p" "yes") (const_int 2) (eq_attr "med_cbranch_p" "yes") (const_int 6) (eq_attr "braf_cbranch_p" "yes") (const_int 12) ;; ??? using pc is not computed transitively. (ne (match_dup 0) (match_dup 0)) (const_int 14) ... The (ne (match_dup 0) (match_dup 0)) clause tells genattrtab that this cond form is length-varying. I had a patch to clear this up with a usable & documented interface: https://gcc.gnu.org/ml/gcc-patches/2012-11/msg00473.html It got stuck in code review, so it's now a local patch in the Synopsys toolchains.