From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2069.outbound.protection.outlook.com [40.107.247.69]) by sourceware.org (Postfix) with ESMTPS id F38C63858C52 for ; Fri, 3 Feb 2023 07:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F38C63858C52 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkYtdDSvfItYm9Hm2fQKrZJ6ZcpVuJV4E8eVKFvpYW1OXCPdbFnfSsujbl0RzrJB6Ux3UXeoC9NnZUgVmAhMR+Vn4BaHP7UzDiakJ1+xg/ey5xoyEPbKTdJBZASb/vPK8UCHPAtceyXwfSa2xI4HOChUmkDyz5RcR/bRS5vUZEzIuaSyeIc+81LRvE5y9mgWi3f9OYcyl0Onodvy6bF3EEa6byzl4gPAyiThSuXIbCsDFdvJExm6l5IzED4b8ZXx5SGlSnHik5H2nY0+itBrb97CuHTQiUQKH8rFf7Quwox0XB+gpQi1pUXX9vAeljEFeEGK8QggWhgl8hVflwnAUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=epUepb80fsWaY3CiTo0AzK2kKR5xEPPQSrttWRochUM=; b=ZkQy2NDKpnwzKjrsPu9WSGQCbJh7KJacC7DMj/qikH8UUEzWLx7NuooURflDtrbrgMgwwBna/FM6bvg/8xpotV/DhAN2cbUHVdJavNk7Cjeo8JiQVwBf6JrdiSzJ+JRjPRa63mf6Txt52lUWfakUjCkBB8yMq7tQZupxXgCe5PoYLPuuZaBCzKwl/mvVudJ7idSvOZXIG1QUTKTI4QTMACkLqjBbFJW157geN0V4gOI/fZ0HxMqA4d5OiSacFzAPYXYr6gHhNOh0AcBKcca41IHHMIkPKg6GWeX6IiV/1DBC29r+L78yi8FZ5ZQvD738xLyuynRfeF1ah0F16DZfWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=epUepb80fsWaY3CiTo0AzK2kKR5xEPPQSrttWRochUM=; b=oTSbrW48G+0o3s4GO3cUfX8in4XbQP5reJruFPqbFNVN19Av6bLukss90ReWegC0ovOys8/Evn5oQ8xaP2N624iZCcjWDnRIeYh1SoAE0RgttynOafpbov2kuxxV1L5eZIT6AXpA0LPelldRlhPGv5LB6wgBL0OR+BzrGq/P8ez1NSkc8HJgNb6wsr8hnsuTye7GXdEt6SCa0KZna87XHtLkO3OQsGKdEySrKDixj6rqtFQiu5/roASEHbwQYUhrVwtigUDw8L59Os5QXDtcCj8XiGQIecvJG1pCDw9Lct+CbORCqio4QUe0ytXAHjRJGvZPvsKfoMYr5T1vXVG1TQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by PAXPR04MB8799.eurprd04.prod.outlook.com (2603:10a6:102:20e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.30; Fri, 3 Feb 2023 07:13:24 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::e138:4fc3:705c:d178]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::e138:4fc3:705c:d178%6]) with mapi id 15.20.6064.024; Fri, 3 Feb 2023 07:13:24 +0000 Message-ID: <61c5de75-d2c9-0e1b-0a4b-f5ba152f8510@suse.com> Date: Fri, 3 Feb 2023 08:13:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH]AArch64 gas: relax ordering constriants on enabling and disabling feature extensions Content-Language: en-US To: richard.sandiford@arm.com, Tamar Christina References: <7c6e61f4-b61c-a451-ba13-914c2e7f0dcf@suse.com> Cc: nd@arm.com, Binutils , Richard.Earnshaw@arm.com, marcus.shawcroft@arm.com From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0084.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::23) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|PAXPR04MB8799:EE_ X-MS-Office365-Filtering-Correlation-Id: 8693898d-fdc7-4127-7260-08db05b6239d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: usk5wD+xY97Za+FNooRxBefrc1Z6GFiaVf6sKYwzEHy26+c4PS3ssNGmwHP1IhxL7/HtvJG/YeMx+gUA2iV1j3hTIhkSplG1aC68ujJKhuqS2HQteQ4T3k0J3oTLmL55z6llDDcim2Q9JVLn7PfKdP7RFUdkStE8BUFcN+s6XheF2I6MQJQaXXiBx3+j2T5csg9azAbxWlMEfhb/hHGONu/y6Qi9Y1wuIp/HxdaPEALufPimAADImuIgvk6QRiNuDmR5DuQNLP8T559sKR9T02+A713pa8lqqYX+7wmzTPUv22nc8Tg1SLAvhF5yjapNEDw51u7wm0gbpW8zzqDnEVPuIqCsyWxNiVpGkNkmAaelMobdHF0ezW+1hdMRxFJy0iK9q+wPcHMXEN9GB9I0gI75aCNBm0L+qQS9+gPw9VYMtGZtGXFpEJzRk9MW8LE6JWydKYeG07bZYX2Y0IJzl90mH4cfYuTT5mpFInzq43xNWVh4Cxlg5JvSdaLhCzKsVQMszUjaYWUB+BM+M36lPEj+p2GRFqGcgjaR3b0Lfz0Rc0BiDKB+gqFf8UbKYtecQO42LzJ2+JfiSEDZ3S5vD+KwclY/oW2iQJsTOSuggKXCvRfO9wrtsqT71J1BxwQC+8g5ReAJ2+JFxx6olGFSU0vGmOSUoFhubAz1xGZ+Yh6CCz60vtyfHnShJY973UuUTATqH3au9v3o7eIODv4uCTPPYVVggPDC94IKg9LQvIc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6560.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(136003)(376002)(346002)(39860400002)(366004)(396003)(451199018)(86362001)(31696002)(478600001)(6506007)(53546011)(6486002)(31686004)(38100700002)(26005)(6512007)(186003)(8936002)(4326008)(66476007)(8676002)(41300700001)(5660300002)(6916009)(2906002)(316002)(66556008)(66946007)(36756003)(2616005)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTlYb0taWHd6bm8ybm93NXF1TzRpc3hHRm11R2hDeVlobnRoZkMvTlo5aits?= =?utf-8?B?Rjc2bmY0UHdydkk2VjFpRFNsdyt1dFBQUmY3OE81ZXZsNFdjRFkxdndXYmR4?= =?utf-8?B?TlN2YnJqQmlEV2wrZzFMcmVlcFQvdVBsWHNEbGcwY01QMHp4cHQxeUhzSTZG?= =?utf-8?B?Rzd6VHhnQlUrM3ZNQ0NubE1KWFpJMUt0UGUyeUZpaS9aam1LbzJWT0txU3ZV?= =?utf-8?B?QmZ6VnJiYmpObFNsTk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N?= =?utf-8?B?ZmV4NVNFYVlFakwrUW80Sjk1UmxMR0wzaDF5ekFrVGIzMzFnTlJMV2J2dGNq?= =?utf-8?Q?IiH4ZlB8/LN7LyFE/HEmC5rZI?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8693898d-fdc7-4127-7260-08db05b6239d X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 07:13:24.4639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ppVmrUdrpt6lBNN75nlaQrimhthAlZqKjNNi/9CL5IFTah7Gs0nmDQwEtIfuxewkgDGmE+eMYiUXr5kcdQHwdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8799 X-Spam-Status: No, score=-3028.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 02.02.2023 14:21, Richard Sandiford wrote: > Jan Beulich via Binutils writes: >> On 01.02.2023 20:25, Tamar Christina via Binutils wrote: >>> At the beginning of the port it was decided that enabling features should always >>> come before disabling features. i.e. +foo should always be before any +nofoo. >>> >>> For years now this has been relaxed in GCC but binutils has remained rather >>> strict. This removes the restriction from gas as well giving users less >>> friction. >> >> Hmm, specifying negative before positive settings may mean the negative ones >> don't take effect at all (because of feature dependencies). While the same >> of course is true the other way around as well, silently accepting >> supposedly disabled insns is imo quite a bit more risky than complaining >> about supposedly enabled ones: The programmer may unknowingly produce a bad >> binary. This is even more so that the dependencies can't be considered set >> in stone - bugs may be found which require adjustments to them. > > Like you say, if we allow positive and negative options to be specified > at the same time, there's no structural way of avoiding the risk that > one option will fully override the other. But that's true of many other > aspects of command-line option handling too, especially in GCC. > > I don't think there's any push to prevent positive and negative options > from being used together in all circumstances. It's just a question > of degree. But when deciding that degree, there is (IMO) no good reason > for GCC to be more lenient than GAS, or GAS to be more strict than GCC. > Whatever risks there are are broadly the same for both. For example, > any mistake that a programmer can make directly in assembly, they can > also make in inline asm. And as things stand, GCC will accept > negative-before-positive features and emit a conforming .arch, which > already allows inline asm programmers to fall into whatever traps the > patch would open up for direct use of GAS. I haven't heard of any > instances of that causing problems in practice. > > There's also the question of whether people writing directly in assembly > need to be protected more than people writing in intrinsics. Personally > I think it's the opposite: the assembler is the lowest-level coding tool > we provide, and it should trust the user as much as possible. I don't agree here (if anything, I'd expect the compiler to be more strict), but I realize that via a sequence of .arch_extension directives the same situation could arise. Hence I guess there's no real reason to not also be more relaxed in the parsing here. >> There actually is an example of something which may want adjusting: Both >> F32MM and F64MM take SVE as prereq. While SVE can't easily be a prereq to >> I8MM (because there are also SIMD insn forms), it's unclear why SIMD >> - itself being a prereq to SVE - isn't a prereq to I8MM. > > Good spot! That looks like a bug. In the corresponding GCC logic, > +i8mm does imply +simd, which like you say seems like the correct > behaviour. I'll make a patch then. Jan