From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20056.outbound.protection.outlook.com [40.107.2.56]) by sourceware.org (Postfix) with ESMTPS id B5C743858C83 for ; Fri, 19 Aug 2022 14:49:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B5C743858C83 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DGuUvroJF8E3pT6PbJeSbZQ4As2BVYsJONvDbfkNUcVlVJGhZb8tRCis0Z+fO9mjQVR3yeX9HWwLWQFv62TAzivSCchdb0JVTkrn4mvtupsOwdiGzeAoaASROz5dVfBHANSUP6/itQgmOqnFmukKbsTs1QKmvi6fR8KLvhwFFrSV7cqYa85EdDJMpANUtfCZk9S8mxKTdEBZcQxb7l7MF1Dyj1plflL5NYdmXH5AP1podL2zRxqPIAlyMMkm5bwShZrRQ6AF0IQ9d8maO2FqHqpBpOzOCnZ9zTLgnNdiCW4QvdO5HawMkryRZXxIExwsi3AJlELRDojcSfU+JVzOgg== 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=7TDINSQt9PP3uyM8B1ibttmGrNkuw1BWQPAvabh/CME=; b=VsE0zq/mVYukhgeFumv2uXc88V7BQRbUIG8wkqqOtv0q2X78MRFuIXt3pRJWj/hd0l7GsP7Wof5Zd2pfgjVLVv/zPKxHzQ9PHJTaMMjHSnQ9nqdcAd74B0KodwDQNDwDtccYFZusdhOb7sP0S9H/OdziEVxhhKwXfl12Du/5cyDYwl/rHXgLkFFHpFiZkS2avDTZti2bBMhPCtSBLptOxfXn7cqQ/a9B0zMXdKyNHz1U4pLYlzw7yqJC9MBORb233/LuMrxnKdWO24Gi4J+qT1L0UfB5JsYqmBqlsdPYed/SYfQdtlrkC/BYWVwYut9AACvfr0euD31wmQ4EliuKeg== 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 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by DB8PR04MB5785.eurprd04.prod.outlook.com (2603:10a6:10:b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.18; Fri, 19 Aug 2022 14:49:12 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2d5d:bae0:430f:70ad]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2d5d:bae0:430f:70ad%4]) with mapi id 15.20.5525.010; Fri, 19 Aug 2022 14:49:12 +0000 Message-ID: <2f50fc23-2511-c7eb-e80e-280812bd0274@suse.com> Date: Fri, 19 Aug 2022 16:49:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/7] x86/Intel: restrict suffix derivation Content-Language: en-US To: "H.J. Lu" Cc: Binutils References: <32216291-fd1f-4579-87de-d24cb7190894@suse.com> From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0074.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1f::12) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7bf27fc6-5c9f-4247-e2aa-08da81f1fad9 X-MS-TrafficTypeDiagnostic: DB8PR04MB5785:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MfM+jhfSDl52tjZzN21wyTRAUfINjbYHkpTmi+a/BQHBct5OCuja7F/xezWCG6RbNAjhgfX79tjhU7rpMNmIY2Qcm5BYiLRAwdQ7927nHEnjo65UWY9Jcjm8K6AxR7kgdKLH3Le18Meed4LayO9cyBAfbfUPMV1LTpAIdpU28OGwyKX1FuxyTrYI2XcYirgFrRsv1EKtYfwb6OEY17HqgLop8WvvQ402p00EE/1O+ogkap0/obVt4bqzRGiWdz2NTivKis6olEE86djWYVIM7f14POJI3LruPyyuF2KU2zIzHsseEFIubyuzkgVqFRGTvtMTIoP9+DYqdaEBySptGKn/fngHmOr8SPYu5cvvi/H8IeaS2+KbBs0uXYYHan149M2yKsrAtBpDDyRaNiqpPjtUoAFZa52EPi8xvzXS4ACbnwU0qXf5qSVdY91Pb3UVrCtlXVgEpf0zmhInwa6zlA5g6txN4qQVMpD8Ufb0PG2O0dpA+Cgjmy++cVKK1wE7cPw1t96kZdwpKuHkoirfbSDTCTKj2+6tDoLz45BAp5H6sipi7nVqcPkBrIyjVkUKi4XTnx0Yzg9S1YKlsekvk/EWYtnXE8Z3ADa3CQZLw/m+BETQwSJ4Y2qoqD+9tWlwQ2TwzQaxqiNso050k4mdMXV87zDWIChbQV6ta71e7Jgjpjd03dmQ/6NwOZkHKICk6yV/iaaDWeo69ZX6QtKfIjhIzgtHp7Y5X5bdEuCrxRqgN4wSEo0T9c72ZIc7csIP3ksfRrIj0GoS2TzZHCL6424y0DfJyzfDEWNagp/ZNZQ= 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:(13230016)(136003)(366004)(346002)(396003)(376002)(39860400002)(36756003)(86362001)(31696002)(31686004)(38100700002)(53546011)(6512007)(6506007)(26005)(186003)(2616005)(478600001)(6486002)(41300700001)(316002)(6916009)(4326008)(66476007)(66556008)(2906002)(66946007)(5660300002)(8936002)(8676002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VFVrd2FOSWdoOEVKbnE1N0VmOStjb2dsbXZyZEd2YVdacitkSVh5OG5KeW1S?= =?utf-8?B?UVZmRzkwbC81WlZxUGJEZkFGeGdKM0UvR1JZdFJzV3pGR0RJLzdONnRPMmdI?= =?utf-8?B?VkdYa2ZJb2kxWjFkZGtGY1VTb3pHc05jb2FoNjNrNys1UHZWeXpKTDVPQWxJ?= =?utf-8?B?TEJ1Yk5FdnhITTk1aWJOQkJ0MHd5RXBJQnhkOUczRVM5RUxmWkE5UUltZEx6?= =?utf-8?B?YWF4ZGMzNEpOSTR4SFVLRkhoSXdJSHpGRk9KbkZMUUgrdjgrNVNxZ0VBdnpB?= =?utf-8?B?bEdVdzN6UCtZRVJkZ2hGSzR3cG54OUExcUR2V2hJK2Rjc2Z5SzlxU2VNOSta?= =?utf-8?B?WTdMU0ZxVndxSXR4Rmx3MVM5OGtGSVJKVDhoVU4xSnRvazcxSDMwbm92VXds?= =?utf-8?B?WEFhQjJidG8vVXRZWWZRTHFQSjQwZ0hPelllMjFhbjQxQ1hnbGh6eU5CYkJa?= =?utf-8?B?YWxLL2h2MlFGaXptQ01lNFZZeHdKUXlnZzVuM2oxQmxBdm9mMThYelN4RVJU?= =?utf-8?B?MlZuaUtsdE5EcVc5SDJ0V3Y1Vm9YZVN3T1p4LzljT0psY3diYXJmczNGR2VQ?= =?utf-8?B?SXFkMWtpTkhFdXEyNzBXSmRvdy90Z1pBYWwxekNzVy9SOVdVMTZGRUw0YWxh?= =?utf-8?B?am1CcEhNU0N1STBkUXpQeHVSN0NoMlRjanVRVXJPb3JXblVPSExGcEQyNy81?= =?utf-8?B?OFVOZHpPNFpGMmFKQU5GU2xUNkFQK3JyUEo1UmtWUVZ6c3dNdU1meERZUHls?= =?ut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MGVkeXZISVNa?= =?utf-8?B?VjltWnpPME1UYTdwbDJUbWdNM2o0dDIwQ01zTHcyRWRkVDlDSXJxZ04wTndl?= =?utf-8?B?ZFJocHdZZEVBSW1RbkRGRnNhWG9mNmg2RER3YjVOK09hUzBjYm9GL2NWeVlw?= =?utf-8?B?WWxzQ09HaVhpWFFBN3dwN1pidjJLR1dCNkNhSk9iRmNzYWErYmNGTVZtczZr?= =?utf-8?B?V0RZSnFpMm93TG45dU1sSVZPc3ZzSnc0d1FWN1ZKbTFDbXBEOUhDcUwvc3FR?= =?utf-8?B?RnJyNmlSTXN1aTRwQ3pVZ1NES2toNTRUdk9Pa0lQRjlpTUZCa1o1ckJVa0Jy?= =?utf-8?B?UTN0Q1JhUmRsUitORjhBUTR6WEFHSWNHYXdzbWJXem5ucTdLdTZrT3Q2dTUw?= =?utf-8?B?Z0l1QVBnWXhHR3ExeHlEOEY5d0szNTNRRUJGUHBOdzJ5bVlEMXpTek1welFw?= =?utf-8?Q?8PifaoP8W950Q5aLSXgelFzva?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7bf27fc6-5c9f-4247-e2aa-08da81f1fad9 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2022 14:49:12.3437 (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: kTcEsmJ/5K7q3mAWPWFXwTuVPSf/j134WrnLXyLIcbuNxSdkO8ni/cIKL6s6g01P8MyHfMl0n49vG5aJ36l8MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5785 X-Spam-Status: No, score=-3030.2 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2022 14:49:18 -0000 On 19.08.2022 16:23, H.J. Lu wrote: > On Fri, Aug 19, 2022 at 1:20 AM Jan Beulich wrote: >> >> On 18.08.2022 16:46, H.J. Lu wrote: >>> On Wed, Aug 17, 2022 at 11:08 PM Jan Beulich wrote: >>>> >>>> On 17.08.2022 21:19, H.J. Lu wrote: >>>>> On Tue, Aug 16, 2022 at 12:30 AM Jan Beulich wrote: >>>>>> >>>>>> While in some cases deriving an AT&T-style suffix from an Intel syntax >>>>>> memory operand size specifier is necessary, in many cases this is not >>>>>> only pointless, but has led to the introduction of various workarounds: >>>>>> Excessive use of IgnoreSize and NoRex64 as well as the ToDword and >>>>>> ToQword attributes. Suppress suffix derivation when we can clearly tell >>>>>> that the memory operand's size isn't going to be needed to infer the >>>>>> possible need for the low byte/word opcode bit or an operand size prefix >>>>>> (0x66 or REX.W). >>>>>> >>>>>> As a result ToDword and ToQword can be dropped entirely, plus a fair >>>>>> number of IgnoreSize and NoRex64 can also be got rid of. Note that >>>>>> IgnoreSize needs to remain on legacy encoded SIMD insns with GPR >>>>>> operand, to avoid emitting an operand size prefix in 16-bit mode. (Since >>>>>> 16-bit code using SIMD insns isn't well tested, clone an existing >>>>>> testcase just enough to cover a few insns which are potentially >>>>>> problematic but are being touched here.) >>>>>> >>>>>> As a side effect of folding the VCVT{,T}S{S,D,H}2SI templates, >>>>>> VCVT{,T}SH2SI will now allow L and Q suffixes, consistent with >>>>>> VCVT{,T}S{S,D}2SI. All of these remain inconsistent with their 2USI >>>>>> counterparts (which I think should also be corrected, but perhaps better >>>>>> in a separate change). >>>>> >>>>> I don't think allowing more unnecessary L and Q suffixes for AVX >>>>> instructions is desirable. I prefer not to allow unnecessary L and >>>>> Q suffixes in folded entries. We can add special entries to allow >>>>> the existing instructions with suffixes. >>>> >>>> I think we've been there before, and I continue to think that we should >>>> be consistent throughout the entire ISA in allowing suffixes when GPRs >>>> or their equivalent memory operands are involved. That's in the spirit >>>> of the original AT&T syntax intentions, after all. I have to admit that >>>> I find it particularly worrying that you suggest to introduce new >>>> templates, when the overall / long term goal is to reduce the set, to >>>> keep it manageable in spite of all the new additions that yer yet to >>>> come. >>>> >>>> As pointed out elsewhere, any inconsistencies here make it harder for >>>> people to write e.g. heavily macro-ized code. Similarly it can result >>>> in surprises when cloning existing code to deal with new extensions. >>>> >>> >>> Will it work without unnecessary suffixes? >> >> I'm afraid I can only guess at what "it" means in your reply. Of course >> things will work for people who have never used what you call >> "unnecessary" prefixes. But there are other people who believe that the >> spirit of AT&T syntax is to put suffixes everywhere where multiple >> operand sizes are possible, and where the suffix allows to distinguish > > In glibc, integer instructions without suffixes are used to support different > vector sizes. 1) Could you please point me at an example? 2) How is this related? We wouldn't require suffixes all of the sudden, we'd only permit their use. Jan