From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88821 invoked by alias); 29 May 2019 13:16:34 -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 88806 invoked by uid 89); 29 May 2019 13:16:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 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, 29 May 2019 13:16:32 +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 x4TDGUOx031090; Wed, 29 May 2019 08:16:30 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x4TDGTuT031089; Wed, 29 May 2019 08:16:29 -0500 Date: Wed, 29 May 2019 13:21:00 -0000 From: Segher Boessenkool To: Bill Schmidt Cc: GCC Patches Subject: Re: [PATCH] rs6000: Add undocumented switch -mprefixed-addr Message-ID: <20190529131629.GP31586@gate.crashing.org> References: <78d1bd8d-bdaf-bb90-4e71-b8e3b9746cdf@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78d1bd8d-bdaf-bb90-4e71-b8e3b9746cdf@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg01898.txt.bz2 Hi! On Wed, May 29, 2019 at 07:42:38AM -0500, Bill Schmidt wrote: > * rs6000-cpus.def (OTHER_FUSION_MASKS): New #define. > (ISA_FUTURE_MASKS_SERVER): Add OPTION_MASK_PREFIXED_ADDR. Mask off > OTHER_FUSION_MASKS. Two spaces after a full stop (here and later again). > +/* ISA masks setting fusion options. */ > +#define OTHER_FUSION_MASKS (OPTION_MASK_P8_FUSION \ > + | OPTION_MASK_P8_FUSION_SIGN) Or merge the two masks into one? > /* Support for a future processor's features. */ > -#define ISA_FUTURE_MASKS_SERVER (ISA_3_0_MASKS_SERVER \ > - | OPTION_MASK_FUTURE \ > - | OPTION_MASK_PCREL) > +#define ISA_FUTURE_MASKS_SERVER ((ISA_3_0_MASKS_SERVER \ > + | OPTION_MASK_FUTURE \ > + | OPTION_MASK_PCREL \ > + | OPTION_MASK_PREFIXED_ADDR) \ > + & ~OTHER_FUSION_MASKS) OTHER_FUSION_MASKS shouldn't be part of ISA_3_0_MASKS_SERVER. Fix that instead? Fusion is a property of specific CPUs, not of ISA versions. > - /* -mpcrel requires the prefixed load/store support on FUTURE systems. */ > - if (!TARGET_FUTURE && TARGET_PCREL) > + /* -mprefixed-addr and -mpcrel require the prefixed load/store support on > + FUTURE systems. */ > + if (!TARGET_FUTURE && (TARGET_PCREL || TARGET_PREFIXED_ADDR)) > { > if ((rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0) > error ("%qs requires %qs", "-mpcrel", "-mcpu=future"); PCREL requires PREFIXED_ADDR, please simplify. > + if (TARGET_PCREL && !TARGET_PREFIXED_ADDR) > + { > + if ((rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0) > + error ("%qs requires %qs", "-mpcrel", "-mprefixed-addr"); > + > rs6000_isa_flags &= ~OPTION_MASK_PCREL; > } Maybe put this test first, if that makes things easier or more logical? > @@ -36379,6 +36391,7 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] = > { "power9-vector", OPTION_MASK_P9_VECTOR, false, true }, > { "powerpc-gfxopt", OPTION_MASK_PPC_GFXOPT, false, true }, > { "powerpc-gpopt", OPTION_MASK_PPC_GPOPT, false, true }, > + { "prefixed-addr", OPTION_MASK_PREFIXED_ADDR, false, true }, Do we want this? Why? Segher