From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42621 invoked by alias); 29 May 2019 20:26:35 -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 42613 invoked by uid 89); 29 May 2019 20:26:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 20:26:34 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4TKGhIv027812 for ; Wed, 29 May 2019 16:26:31 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sswvwqx6s-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 29 May 2019 16:26:31 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 May 2019 21:26:30 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 29 May 2019 21:26:28 +0100 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4TKQRrk33096098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 May 2019 20:26:27 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7BC4AC08D; Wed, 29 May 2019 20:26:27 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7EED4AC084; Wed, 29 May 2019 20:26:27 +0000 (GMT) Received: from BigMac.local (unknown [9.85.143.85]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 29 May 2019 20:26:27 +0000 (GMT) Subject: Re: [PATCH] rs6000: Add undocumented switch -mprefixed-addr To: Segher Boessenkool Cc: GCC Patches , Michael Meissner References: <78d1bd8d-bdaf-bb90-4e71-b8e3b9746cdf@linux.ibm.com> <20190529131629.GP31586@gate.crashing.org> From: Bill Schmidt Date: Wed, 29 May 2019 21:25:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190529131629.GP31586@gate.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit x-cbid: 19052920-0040-0000-0000-000004F616EB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011180; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01210418; UDB=6.00635935; IPR=6.00991450; MB=3.00027105; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-29 20:26:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052920-0041-0000-0000-00000902309B Message-Id: <098b3e26-96ea-401e-823c-300c1935287a@linux.ibm.com> X-SW-Source: 2019-05/txt/msg01967.txt.bz2 On 5/29/19 8:16 AM, Segher Boessenkool wrote: > 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). Oops, yep. > >> +/* 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? I'll ask Mike to explain this, as I don't know why there are two masks. > >> /* 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. Agreed, I think this should be masked out of ISA_3_0_MASKS_SERVER, but would like Mike to agree before I change it in case I'm missing something obvious. > >> - /* -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? ok > >> @@ -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? Performance folks are using it for testing purposes.  Eventually this will probably drop out, but for now I think it's best to have the undocumented switch. Thanks, Bill > > > Segher >