From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) by sourceware.org (Postfix) with ESMTPS id C256F3858017 for ; Fri, 19 Aug 2022 08:20:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C256F3858017 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CsrV1QX+PTGyIXhgAMH8uTXCuHui2F1g3LHaPPVTtw6INGHU7HzOG+aVQTJiSwjci0C0Uk5yyVJXOHUy70xUOONl+d4uLPYYxXrqMOCO74uxN/ujotvM4Fp7F3gFnx/Vmc84ZKhK3G79bk7uIVKMmvUWagLBaZ3r0UcIoTrOZPPxzv6clU13e7nVkW04NcbrW3X3l+OLBl+7cwI8TJR6m0Fzju2J9+9cWar57PcI6JjniIWK1J8AHDr+io2vGPh55jWOuN5Yy7Xkdl0MxmX95ru+FcK16cqcTFMZ8dadiYmvNsnexNAbf9an5SG3liSOMkwdUxruqXwTGItUUjHNhA== 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=TBkN+nSgbcfUfivDiPXDIkQVdp5fQ9VLajs8zR+yD3M=; b=Voev0AjqiE1HqNiMoBVnuSOpdvnV9Sbd7iIpQ3HzZC3j7Ky9lZExdAZxErolvb/mwYbaizZNyRqWLbPs/BvNwdmjTBG7k1vBhh3f3LoPjXWSVn/TcS6hI4lGVFysdKyHvCGNv/rtu9LjkPcoyEa+PRWs4FMM89YgWOYJrJWLTLdPUvvE9Pn1c1T7w6ObB6loJg7Mp2GavXKxTOiZleLu7oXQkGDKnPxVdW+NuZ0SxZbq6DDSrjPxhiCCZmWj2KPeihY/afjcW0aMYLvfd1qIDe/MgrfSKHhFje2VtEaYcHLIeBHIFCqhp9XSJ1soWTB5Ot1iWHmIAFVdl8iSXFeSfg== 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 AM4PR0401MB2305.eurprd04.prod.outlook.com (2603:10a6:200:54::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Fri, 19 Aug 2022 08:19:58 +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 08:19:58 +0000 Message-ID: Date: Fri, 19 Aug 2022 10:19:56 +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: FR0P281CA0124.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::13) 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: ebe53e94-a83d-4046-f072-08da81bb9afe X-MS-TrafficTypeDiagnostic: AM4PR0401MB2305:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RML3Q6NmdObjKOj5WHhDX8TNJ9CcKN7ND3W599km1yy9Kq3RqMWMgwHR5KlV/UJ4h7nwpj5eVHbi+7XKaUwSKSrn5qPQF5iCE6UzxYwVgVR/nhsuQogo5/b8U5/4jiFTDJJXK754rY/4piOL9I/xMWNQ2wJkEYPHFF4onjS4wEhVz9eb7CmaRQ7RUqbqHv37bDsx821qobNlH/ehGLhpxZ/iy5NvQeThKReB0RWoDdSMh7zbCKuCWMjBZthd6EiNo8GN3xzV9QbCN5ZtEG0kzAzlPTIuqaUGsWp3e37sZuYk9g0y/ne1HmuPzkxBrXtEZHhYG1UbAuzzokboVbYpCYHIS+0Kx+J1WPBv1HUD13dg+U6MetcaxSP5nna5FSbrDqAgwi6kxrv/iiU93r0sTJbmMg5a5EzOd4kxxEQUUMlXSabQObb8u/NMe6BFzm0WxLHEPOE9Wz7KWWlVt2BvpmuBlhpwzqq5o+jrq58A/6lGVC5NAQhlyxZfBUh93433REuM6CdNN+utmuFpK8J73uHZhyQ9YjcPRLEM6/kFrFJotxfNUpqTFQaTS74kBClvEpuWDoR2DySPB7TPUntsEpTzL2sgD0za9dPb5xdrrtCLkLYfryI/e4d0SzGsiIh8o3ATSc0OzN7K0i5EJNOHzR3iQ4fKT+obuu/X+Es6PJQMm6ChZTimMPWFjxJm0JAkzxtpSwYMPzqAlcV1CJY4IDrHf/od8JUt69w0eCGpvRlZhnC0F32JY0jw2HbCH2AyyskM078/zGz0lGqY7GSZcGxOkqk35dvUNowpQ9iPqC4= 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)(346002)(376002)(396003)(39860400002)(366004)(136003)(6916009)(36756003)(8676002)(66556008)(31696002)(41300700001)(31686004)(38100700002)(86362001)(186003)(6506007)(53546011)(26005)(6486002)(316002)(2616005)(6512007)(2906002)(66476007)(478600001)(4326008)(8936002)(66946007)(5660300002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTJGT083ZWlGZHVLeDZnVm15eWpuWm1UUnhTRUFMckY3ZW8wRWQ3Q1lRWXlZ?= =?utf-8?B?SXFhQTdnbjJMMVVLRHMrQUJDc1hjSDJVUEljbWRVWm1sRE42bU1pZjB6THBv?= =?utf-8?B?cGhhQWNtcGxiK213R1lpdEM5dmRwdzNlNlhOZkVSSm8zVkNmU3I5MWowQzRa?= =?utf-8?B?TEM1dG9tTjBRR2F5U0J4cnFQTkFYMStqbTIxaFhFNlpnRVpTdGxOSExNSk03?= =?utf-8?B?OHZORnJyWjI2YytYWlRmbkdJUmJtcTBKMzRvYTc3WVIrQ2FVMGx1WVp6azZP?= =?utf-8?B?blkvSU1pQVJTMDFYSytVQnN6blFGajZFeXowR3dRZkcwdmE0bUpGcEdDMnRp?= =?utf-8?B?cUlGQ2wwbE01c2swNEs1SkZXZytzczIrV2h3VklIQ1cwS1NKelpxa1A2K0NF?= =?utf-8?B?d21URHlCNlE2TWNJVzIvdUJZVVc0OGxrMkQ5SHhhQkxHenVVcXVUTUJIYTlj?= =?utf-8?B?MmtHRTNvVmNVc09MNHkyOHhhN1FkUGdlU01pbDhhMFNWQy9lMFZjdDVPWW8x?= =?utf-8?B?dzB3YTJhWGxXNXk1ajhKbHd2MExyMG9nUmxmR3BrdmZZQmpRQVlrZGRXTUpZ?= =?utf-8?B?WTUya0t1OUl2Z2JnSUtMN2loZHUxUk5Ud0ZEcWRjT1FhWkFNb3VVZzFQb2Nw?= =?utf-8?B?R3Z5MkRaSU1VMHdUdFZNcnRMMHJlNlMwUGZoSFlVS0M2cnhqODFaTzVtYjdX?= =?utf-8?B?b3F0QUsrVTdEbHA4Yy9iVGtUeS9icE9JaXVxYThjWUN2RlVqd2pSclFTMHJZ?= =?utf-8?B?ZDBMWEFoYmJN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ZualJEUVZPb283cDRYQi96R3c4Yzc3czdTVTYvd1lvL1Bm?= =?utf-8?B?NjF4cmZMMWRHWUh3aStIUzc3cmx5RnR1a0RFMG5VY2k2cENSU3dVdTRjRHJ4?= =?utf-8?B?K3RKVVI5UGhXM0t0cTgrMTMwelJ1OTRoWms4NlJNdnY5d0MyY0FvbkxqZUdS?= =?utf-8?B?SjExN2gydlVLaGp1MC9wYXpwbGtDd3NPWFVrTVJVTmdDT2N3ZjJocXppd3pK?= =?utf-8?B?UDR3USt4cVQ1bGJiS1dxQUZIUFNDSVhWblZDdUFWZEpiRlJUMWJ6Q1JHTWFL?= =?utf-8?B?MEdKYTVNV0MvTExvMGR2bWVlelFHRTVpVEJ5b01UTys5OSs1MkdmcHlhZ3Fl?= =?utf-8?B?YzM5ZVdhQnNXRUhXWklleWdTSkp5QWlBbUR5NzdTV0lSaUlxMXNJUUs2RTFp?= =?utf-8?Q?xNjKOOga5sTq3x3pwK9caYUUB?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebe53e94-a83d-4046-f072-08da81bb9afe X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2022 08:19:58.6862 (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: KPndtdms6PT+iBTLUHw9nffNbj7+feplm8Kq95wwfbZUWAITMRhyiba3sdk8Bo5WoR0fchLFMuy9STOgg1qM8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0401MB2305 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 08:20:04 -0000 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 them. One possible reason for that could be to have the re-assurance of the assembler pointing out mismatches between suffix and operand(s). Jan