From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 928FC385DC31 for ; Thu, 2 Apr 2020 17:27:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 928FC385DC31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 032HRKl0024076; Thu, 2 Apr 2020 12:27:20 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 032HRKw0024073; Thu, 2 Apr 2020 12:27:20 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 2 Apr 2020 12:27:20 -0500 From: Segher Boessenkool To: Michael Meissner , will schmidt , gcc-patches@gcc.gnu.org, David Edelsohn Subject: Re: [PATCH], Set -mpcrel by default on Linux 64-bit systems for -mcpu=future Message-ID: <20200402172720.GD26902@gate.crashing.org> References: <20200323203838.GA32034@ibm-toto.the-meissners.org> <4844b04a2480609207ef41f48cbe3b363c4ed627.camel@vnet.ibm.com> <20200327183036.GA4709@ibm-tinman.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200327183036.GA4709@ibm-tinman.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-43.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 17:27:22 -0000 On Fri, Mar 27, 2020 at 02:30:36PM -0400, Michael Meissner wrote: > > > -/* Support for a future processor's features. Do not enable -mpcrel until it > > > - is fully functional. */ > > > +/* Support for a future processor's features. The addressing related options > > > + (like -mprefixed, -mpcrel) are not set here. */ > > > > So, where are they set? why is it important to say they are not set > > here? > > They are set in rs6000_option_override in rs6000.c, like all of the other > defaults. > > The issue is that not all 'future' targets will enable these bits. In general, > it is simpler to set the bits to ON in the cases where they should be, rather > than settings the bits here and then resetting them. > > In particular, other operating systems (like AIX, Linux using ELF v1, or > 32-bit) might not have the necessary support for the PC-relative relocations. > In addition, if the user did -mcmodel=large or -mcmodel=small, we cannot turn > on the PC-relative addressing, because the instructions only have a 34-bit > offset, and the other code models have different assumptions. > > Perhaps one day, we might think about adding the support for -mcmodel=large, > but for now, you need to use the normal TOC addressing for that. Please just don't mention it here at all then? It only confuses matters, it does not help the reader at all. Segher