From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70087.outbound.protection.outlook.com [40.107.7.87]) by sourceware.org (Postfix) with ESMTPS id F031D3858C78 for ; Mon, 7 Nov 2022 10:23:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F031D3858C78 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=aCMoSbEyttpAyKWGkCFk4I92ALovd5PPPakayZzJyK7GiEQI/1ZQQ6uMRjm/MxN3u2RcncVmEsxNbRm9sqwNb2kCo1Dc+MYPUqVTiGGR8eNE0gXFiljg2blLvCxEoL1x8EUnXcApLZN/mXwRtMeag6qifk9oPdQ7Ya6bjPrNCMNxArNI2QqLvipIwisgOY1kUcGpMqZbHzo975EmojtC4J+wRzXa/mbvxLEgZ4E4XLIUqUrNiaGG/UYAAPOhLGPcuxotM02bT7d7rwt10DcqqKt1THHwtm6QWtQQth3jiFtyMjMJM4OaYy+5U5Id1Tqzezb6jcya+h5xEmSPRI+iQA== 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=iPfVh9ejoRty+AK2d2fKFT20OPDp0QfIWFD+2WxbuPY=; b=OV9VlMrr2i9DVBg/jfvCet3kXHpROpmYsH0E3ID94iL/g1Px5XXLh3m5iZv96J/8lyEtYRIO2KuCzDPu4Ok7zMHXc8YftplI0Lu0gwbEk4fxYVzWkH1ETQa/I8hY32yhuo7UYXyaxL8+F9jdC/YCkWYy+k27jk4IoSgtoPJ4Q7/a7BteaxnXbb0le/OnpSIGyXhGBTlDQq1O+eurk46UGhhDWqClRnscBlZulXNuc3jjmIOIVDsj2DlHjijXlm0X7DVQrwLvSKrGI9jbEnKm6D7cvPt30dhRcPD9+BkwmgpXP7XXt7me7hxoM7WHEHJSQQ5f956GdROs1QrJHC5Xew== 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=iPfVh9ejoRty+AK2d2fKFT20OPDp0QfIWFD+2WxbuPY=; b=MCF57WJYxNdKit0p3rUwGvywuRj96MbOHCrD85fA+Co71YTL/x5fn/AkIH3CpbkCoc8O0QTcc6eroBUdbWlpJAJ1aQjl5Lp3GPLVdZY+4OBV+IZECPl/9Sl4ZenI6gNfXYUDUzVPs83v71+X8ss71t8Mhv/AMoSkjwplnCuPoBMEAW6LNNKK1dFD9S3ZlzolaFnjOnAWeGE1w/9uDtlOzUZkOc3H6t6ALexAsCRZl+zjngMn2hHKCr2GTXAdF0sMih5r1GO1lnsfGc5KcimXeDxTqHstN4P8DQ6cSMpm9PzgmVVbydEdzgiVcRkCODDC9fcB7WT+f9ZUej4HREkgug== 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 DBBPR04MB7644.eurprd04.prod.outlook.com (2603:10a6:10:20c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Mon, 7 Nov 2022 10:23:11 +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.026; Mon, 7 Nov 2022 10:23:11 +0000 Message-ID: Date: Mon, 7 Nov 2022 11:23:12 +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" 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: FR3P281CA0174.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::17) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|DBBPR04MB7644:EE_ X-MS-Office365-Filtering-Correlation-Id: 8da77d11-da6b-4578-5e9b-08dac0aa128b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IBpcFy8EFu5+/CVLxJp6/HYaI2qzLCKhVGmOFmof+42wqRnONpwx6Uny61wrX0bcaWWq7B+Cg8DNJ+01CNOqVKskFBbIw+CgirYG3JqOml1/kYE3FxeMQv5huBSrVuUDJMN3FpBU5w5auujxn5GqQr4chEN2K9DPy55Lv81wf3firPBaMrVaDeRqWb5TA0xuXEvTa9HD2Tzzu45wSDEkXKkUiRyOjS6mAn+UCjeprbyth4Y6bv8n2ggsol1M2dykikW82qM4AS6GjaeBdBoYyTR77jnwcrHjh6hgnBsLv2YF62tNaGW0s2Oy2JGnBbgyumMjN/mMunSy/p92cH9urqAr7WGsLmLBodjrvcva8p+dC/mX+GQzdZvJPN6m65OVciJWFoxffKuTzM4Nzyh+Bg9nMIjf8kTosp2CDHX9NxlK9mCSuc0kQfQHbQ55d6KobFmCqfHc8nq+VEMVwHyS0+0zKtI5BCsMWHdRiQIQQS+mE2WntyX19c+DuQRkpr7JfkZJVTXzqkKhVeo80VJ3BGPECWBPdTP7Oxj59rMK8JBVOf2Y7NktIQfr/WjkrEfcPoFAi9alPctEPAj2eUnuz+ZNA2WcvIY6pnj9KT4lOZ3r90pqtAW2tM1MKunrnCcZwnYxR0QjZ+0/qzp8msY8djesglZzSN29jrSxCY+XG5MWkyOUhfV1HWCe+sgPM0qx89KfMO0mEo5aDhT5c3ebn57LwQ4JwFZHU6+Ho6/yNN1oin8dQjHBdKUKhMTYCVBagetzwII7kY+uCnajlG2NMKbxlioVKyelz0xiH3Kj4LY= 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)(376002)(366004)(396003)(136003)(346002)(39860400002)(451199015)(186003)(53546011)(26005)(6512007)(6506007)(2616005)(38100700002)(83380400001)(5660300002)(2906002)(6916009)(478600001)(6486002)(41300700001)(4326008)(8936002)(8676002)(66556008)(66946007)(316002)(66476007)(36756003)(31696002)(86362001)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RDI3TURVYWxWNTRDWlhxcGRteHRGR2lrNzhFYXI0ZTNmMExqZmNpdForNFBm?= =?utf-8?B?U3RQdFFrcnhKRXRTNjBmT2svNXc0TkJ0VTlyNXpsOExkODNBcE4rWHZPb3lx?= =?utf-8?B?enFXQWlQMFJBNlhUUTZOVzh1bVR4RjRVYUlmMkpPVTNEYmxnSjlISnhCeDli?= =?utf-8?B?MHZ5SlV6UjZZc2ZlWDVqRVZLblU1M3BNb0pvYXBORlh6OWo1eElWQjVOMjFF?=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UGdaMzM2NzBadGd0R3FzRUlhM2Ix?= =?utf-8?B?NVpqSUpjQ2ZjQnhHWWUzdTkxcTBTUit6RGFBbTJTUWgwSUovRDdJMnpIT1pq?= =?utf-8?Q?jn6ee8cXXq3UQVjPM/2UTZggM?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8da77d11-da6b-4578-5e9b-08dac0aa128b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2022 10:23:11.6005 (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: ks788LO0uFNUX1X65y91ynld8pVwXiQlEUBdm2aUfn2oHgtqnj1gE072uAEAm4s/Aye1q26oT9PeQMFFE6mR9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7644 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 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.) 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