From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104418 invoked by alias); 23 Oct 2019 21:42:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 104407 invoked by uid 89); 23 Oct 2019 21:42:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Oct 2019 21:42:22 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x9NLgKHR010022; Wed, 23 Oct 2019 16:42:20 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x9NLgJ3q010021; Wed, 23 Oct 2019 16:42:19 -0500 Date: Wed, 23 Oct 2019 21:45:00 -0000 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH] V6, #1 of 17: Use ADJUST_INSN_LENGTH for prefixed instructions Message-ID: <20191023214219.GR28442@gate.crashing.org> References: <20191016125100.GA31255@ibm-toto.the-meissners.org> <20191016133533.GA4483@ibm-toto.the-meissners.org> <20191022222719.GK28442@gate.crashing.org> <20191023210058.GA23113@ibm-toto.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023210058.GA23113@ibm-toto.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg01702.txt.bz2 On Wed, Oct 23, 2019 at 05:00:58PM -0400, Michael Meissner wrote: > On Tue, Oct 22, 2019 at 05:27:19PM -0500, Segher Boessenkool wrote: > > On Wed, Oct 16, 2019 at 09:35:33AM -0400, Michael Meissner wrote: > > > - int n = get_attr_length (insn) / 4; > > > + /* If the insn tells us how many insns there are, use that. Otherwise use > > > + the length/4. Adjust the insn length to remove the extra size that > > > + prefixed instructions take. */ > > > > This should be temporary, until we have converted everything to use > > num_insns, right? > > Well there were some 200+ places where length was set. Yes, and I did volunteer to do this work, if needed / wanted. > > Please use a function, not a function-like macro. > > Ok, I added rs6000_adjust_insn_length in rs6000.c. Thanks. > > > +;; Return the number of real hardware instructions in a combined insn. If it > > > +;; is 0, just use the length / 4. > > > +(define_attr "num_insns" "" (const_int 0)) > > > > So we could have the default value *be* length/4, not 0? > > Only if you make sure that every place sets num_insns. As the comment says, > until it is set every where, you run the risk of a deadly embrace. Sure :-) Segher