From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80072.outbound.protection.outlook.com [40.107.8.72]) by sourceware.org (Postfix) with ESMTPS id 186FC385843D for ; Tue, 8 Nov 2022 08:29:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 186FC385843D 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=j6fd3lGcl6ERtVzmJ157wLQCYChpLcz4fOrq3RMQ4pt918Us10whz6JRyLWp8C1eUEUa01sQyz9RXxowFFZ2kMDHQWBEgUtAqB/Cr2XCI9Ucl2ojg0gj2KSCn47lkSKlX8PMDVmv8rt2P1qmRlSE+wKYJD+3S0IypxsXrVlI6WwUjsiFqXU+tf7O2jTpRPQVwHGqzZvo0dDw6EjNg470XvJuHdX/AFU7qXJE3AWxhMcEcELoGQAf2+AfW4WGWgn/vcKs+0cNxvMV5dbcCEhE+xluZgB1CdtKeC2ou/VEg+W66+AAIju9R9BvNjbEA8WtbszSyckvbWI1BEhgA9W0+A== 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=i54tc/npJWtJlCk6bpKGq0PivPLkvZk9DIDFEPsoep8=; b=fPpg2R8Mw8HqpfK9enMRHVLPbF3e0dQZ8zS0/KttHm8frnd1JUOlzGrkrueYjqN5mNeynLRhUFiaS3eTiELDsepbWqf6V3q1k6YPPO6MsBiDxQnXeQfJyMGcP2xI6h7+DvZexIq3OZmLh+qaua260MaRXwsLU/Hro/FwKyBiHq/7k3iIX48Ietg96Vhizww9HrwL8kr/bsW8SXIHXsX5yh3FHKxFEKFAf2XyeSaoAiYJUbyilpG5HqYiDX3ZF8eGaFjEla9WzIYxnYKiqva35C2PDBRZQsa096Wz+4QH7pYizThexdCxWyt9Z0JIoJe10fCfGXOO8RJqrLZQr3PD1A== 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=i54tc/npJWtJlCk6bpKGq0PivPLkvZk9DIDFEPsoep8=; b=YOoK69q3YybVo7DJWqRLeDQilGAc16epVvMBf910UPRoiy5QNZEfO+ceUQtv8bf9p+x2/NVCwWEEtELUzTr54VmtJdlspzsuFDbJAtYGkEGWtU4rZ7tzx+Ig5N1bfxVld0b89FJQ2tzW5p5B1YQj8rB8MWtA9eEcP5JHa1hb8w7vVzYFozb0aIv5zHZwUcIkXWOME2JDlszUxUsZEO6NOnGvv8MrtSGHapI4Dtply6vQ3nRdVCkIYCtvED4Ye0w1KzzcnyReLJMoJcuADE4+DN8ElaPI0ugj/NZis4lBbPi/Ix4mNuxztgaW56UUwEuBiwvRAg4F5nhLptWGJMMU4A== 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 PR3PR04MB7353.eurprd04.prod.outlook.com (2603:10a6:102:82::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Tue, 8 Nov 2022 08:29:05 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::4da2:ea8b:e71e:b8d8%4]) with mapi id 15.20.5791.027; Tue, 8 Nov 2022 08:29:05 +0000 Message-ID: <77353539-55f2-248f-f04d-d50c281290aa@suse.com> Date: Tue, 8 Nov 2022 09:29:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v6 2/7] x86: re-work insn/suffix recognition Content-Language: en-US To: "H.J. Lu" , Nick Clifton Cc: Binutils References: <6d71dc80-91c8-7bc8-c57f-4f771ca59fab@suse.com> <07ef67fd-752c-ad1f-b8cb-4eaec1f420fc@suse.com> From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0042.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4a::13) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|PR3PR04MB7353:EE_ X-MS-Office365-Filtering-Correlation-Id: f308ccc6-a285-47e1-b5f1-08dac1634c10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WvPHQv7Vkf1J6Pi6TFJ9mQaoeIOo2zioJ+H+b8qPxOXj6YXjdJthscvFJA/YAOMaZ5sIyS43ukDfnoY4vixtMyGDZK6jj7ax5Ex5BVQE1eEYHbsl07SNNW8KajAp/hha8UO3G9hDWuvUkh58XRSV7xibXPxfOZLBXigCQR+zZVYVv07CqElBSxAw7VSizURmAIGmb+aDHwR/C9+zonUGl+FgoqkampZ1dHikCI/lUoj0W2uAwx9WCqfoBhU3WSZhV9/KeH1PUrzJOkjpgtopzRMTlG+kBLBXfCa+2aqoNeADnDbbsBkUjZbYE3cmdltY2QGF2pXxpWTU9O4hz6posuLl+BRG4fzd9Q9jObtID6jfLGGsmXSdUZGAJDXrTw+RcSKWkjUpTKW9xGO02fs0Ly7fyA8T/efHqjv+hM5obweFfEXQ91EP3CCQFGyv6JrIUuX1t4mqVLwCArd8b2GHMHgitECgJTOHg2xIDvcrz9Hk6/ze6mBWn6ee+0oARx3lLH017FYxAwKHwWDojzaBqCv3MYd420Oj9xQK9qCIxQvCIgx3Tbs4mZBmOSK0dITlel3l+WPIcqTQheUXCInV3wFgRh1qIh42x9Cu7M6P1ANG/4hxBpFekw4V/c9zLx+YfIIIMQy85djEfNPnvGgPwzrrNMbuKi4aasTpzcXmNd+6JpgBeNNVULcJjJKWZWnDS4U1A2qo+HuPrnl16PkArEMSTHU83CrRcVPnHIDEvRXzGmHInPa+QrteYPKrFyVAFyWGebJU2t+fXn99DVhBEsQs0HcJyHJmok1k8cZCCU8= 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:(13230022)(346002)(136003)(376002)(366004)(39860400002)(396003)(451199015)(31686004)(66899015)(31696002)(6512007)(86362001)(26005)(41300700001)(478600001)(38100700002)(2906002)(36756003)(2616005)(8936002)(186003)(8676002)(5660300002)(4326008)(66476007)(66556008)(110136005)(316002)(6486002)(66946007)(83380400001)(53546011)(6506007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVhscTdONkw4Tkd6OTAzeVFkNS9FOEpYQlpneWpJMlZYWHFlbnFmb0tNSlZW?= =?utf-8?B?UkQwdkFHYU9nQWsvbEprL3hpTThNSjdwKy96TkRpcEtjSUJ5L3o4RW9QejMr?= =?utf-8?B?TnRoWmdVTktnT3llS3FHR2pyMmhFNjJUeFRCem8yZkJTbElBMTloRHlxelVp?= =?utf-8?B?b3c5SGRXdU5OR2R4dmZPelBiNllxNzArV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?utf-8?B?a0RhRHZlNlppU1FpcjVhbU80M2QyRk9PZCtraHpsRmpEYUtWTGZJQTdBVG5Z?= =?utf-8?B?ZW54Q01ORy8vQUgyazVFL1ZOT0tOUlgrL0ZhbUluSnVCV01tV1JaQ3czcVNE?= =?utf-8?Q?usun0kaRas7MjA37MnzcgHX38?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f308ccc6-a285-47e1-b5f1-08dac1634c10 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2022 08:29:04.9683 (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: VKwIr7oxpgqapYNj3S7jlOqTyzS25Epqd7F/BTHj9H8YPqr3AdEE+hWt9y4o7nXxbFxYeHIaVbuEBzliiukrXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7353 X-Spam-Status: No, score=-3029.4 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 08.11.2022 02:21, H.J. Lu wrote: > On Mon, Nov 7, 2022 at 2:23 AM Jan Beulich wrote: >> >> On 05.11.2022 00:54, H.J. Lu wrote: >>> On Fri, Nov 4, 2022 at 3:51 AM Jan Beulich wrote: >>>> >>>> Having templates with a suffix explicitly present has always been >>>> quirky. Introduce a 2nd matching pass in case the 1st one couldn't find >>>> a suitable template _and_ didn't itself already need to trim off a >>>> suffix to find a match at all. This requires error reporting adjustments >>>> (albeit luckily fewer than I was afraid might be necessary), as errors >>>> previously reported during matching now need deferring until after the >>>> 2nd pass (because, obviously, we must not emit any error if the 2nd pass >>>> succeeds). While also related to PR gas/29524, it was requested that >>>> move-with-sign-extend be left as broken as it always was. >>>> >>>> PR gas/29525 >>>> Note that with the dropped CMPSD and MOVSD Intel Syntax string insn >>>> templates taking operands, mixed IsString/non-IsString template groups >>>> (with memory operands) cannot occur anymore. With that >>>> maybe_adjust_templates() becomes unnecessary (and is hence being >>>> removed). >>>> >>>> PR gas/29526 >>>> Note further that while the additions to the intel16 testcase aren't >>>> really proper Intel syntax, we've been permitting all of those except >>>> for the MOVD variant. The test therefore is to avoid re-introducing such >>>> an inconsistency. >>>> --- >>>> To limit code churn I'm using "goto" for the retry loop, but I'd be >>>> happy to make this a proper loop either right here or in a follow-on >>>> change doing just the necessary re-indentation. >>>> >>>> The "too many memory references" errors which are being deleted weren't >>>> fully consistent anyway - even the majority of IsString insns accepts >>>> only a single memory operand. If we wanted to retain that, it would need >>>> re-introducing in md_assemble(), latching the error into i.error just >>>> like match_template() does. >>>> >>>> As an unrelated observation: Why is "MOVQ $imm64, %reg64" being >>>> optimized but "MOVABS $imm64, %reg64" is not? >>>> --- >>>> v6: Re-base over dropping of Pass2 attribute. >>>> v5: Split off move-with-sign-extend changes. >>>> v4: Retain support for operand-less MOVSD and CMPSD. >>>> v3: Limit xstrdup() to just the templates where a 2nd pass actually >>>> makes sense (new Pass2 attribute). >>> >>> I don't think we should add a second pass. >> >> So you've asked me to re-work the series several times just to _now_ >> say "no" altogether? What's your alternative proposal to address the >> various shortcomings that this series is addressing? (Yes, patches 4 >> and 5 can, with some effort, probably be re-based ahead, but those >> are only minor improvements found while doing the main piece of work >> here, and they aren't strictly related to the main goal of the series.) > > The more I looked, the more I didn't think we needed the second pass. > The issues you raised are minor issues. We shouldn't add the second > pass because of them. IOW your view is "let's keep the assembler broken, and let's keep surprising assembly programmers". I'm afraid what is to be considered "minor" is up for debate _and_ it is also up for debate whether leaving "minor" issues unfixed is okay. The more that I've already done the work in the cases here. Please revisit your looking at it. Furthermore I don't think patch 3 (which is merely a first step to take) can really fall in that "minor" category: The "inventing" of suffixes in Intel Syntax mode has always been bogus. Yet this patch builds on top of what patch 2 does; at least at the moment I can't see doing that same work without first removing all the stray "movq" templates. (Their presence also gets in the way of patch 4, but there this could be dealt with afaict.) In this context please also remember that I'm the maintainer for Intel Syntax code, so it is at least an edge case for you to block me making improvements there. Nick, may I ask for a more project-wide view on this perspective that H.J. is taking? I certainly don't mean to (ab)use my global maintainer role to override him, but I also don't really agree with my view being put off. Yet if there was a more general (unwritten) policy like this, then of course I'd need to accept things the way they are. Jan >> Plus I now really feel urged to point out that you're blocking further >> work I have pending, which I keep re-basing over all the adjustments I >> was making to address your comments (plus of course the new ISA >> extension patches which have gone in recently, all of which also >> collide with work I'm doing). This re-basing is non-trivial and hence >> is consuming a considerable amount of time as well. >> >> Jan > > >