From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25948 invoked by alias); 3 Jul 2019 22:10:02 -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 25940 invoked by uid 89); 3 Jul 2019 22:10:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,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, 03 Jul 2019 22:10:00 +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 x63M9wCR011308; Wed, 3 Jul 2019 17:09:58 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x63M9vCj011306; Wed, 3 Jul 2019 17:09:57 -0500 Date: Wed, 03 Jul 2019 22:20:00 -0000 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH] PowerPC Prefixed Memory, Patch #4, Add pc-relative reference support Message-ID: <20190703220957.GC18316@gate.crashing.org> References: <20190628000602.GA24286@ibm-toto.the-meissners.org> <20190628185033.GA32553@ibm-toto.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628185033.GA32553@ibm-toto.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00302.txt.bz2 Hi Mike, On Fri, Jun 28, 2019 at 02:50:33PM -0400, Michael Meissner wrote: > --- gcc/config/rs6000/rs6000-logue.c (revision 272714) > +++ gcc/config/rs6000/rs6000-logue.c (working copy) > @@ -1406,23 +1406,13 @@ uses_TOC (void) > } > #endif > > +/* Create a TOC style reference for a symbol. */ > rtx > create_TOC_reference (rtx symbol, rtx largetoc_reg) Does this really belong in this file? It doesn't do anythin *logue, and it isn't called from anywhere in here. > +/* Create either a TOC reference to a locally defined item or a pc-relative > + reference, depending on the ABI. */ > +rtx > +create_data_reference (rtx symbol, rtx largetoc_reg) Same here. What is largetoc_reg? The function comment should say. It also is only relevant for create_TOC_reference (where such a comment is also missing), so could you factor this better please? Probably a create_data_reference with only one argument? Which calls create_TOC_reference with a NULL second arg. It looks like your proposed create_data_reference will not do the right thing if called with a non-null second arg if pcrel. Perhaps that cannot happen, but make that clear then? Just an assert will do, bigger cleanups are better of course. Segher