From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2047.outbound.protection.outlook.com [40.107.105.47]) by sourceware.org (Postfix) with ESMTPS id 0FE943858D35 for ; Thu, 5 Jan 2023 08:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FE943858D35 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=evgZfyH1jDPtRNcvTdhUbRnzAHL7cQTVMLoukZxDHGDjkw/kBsceC2L+VNZPRe8wtp3ILt1ZoWq6dNBpsK6fbXjcrBqhScC9YjG1VAY7u5e6LcjrAudJSW5npFCo7QPid4aC/hHFWWXbYDe4Somc1UKhyeZMCuGXd9GXF4IK6Lyb/Sng1ghUjwK/EnH7CnSKOVokB3WdCm0ibVtZAmTuAuN+EmIUdnqa5zlrbQafbKqa+92Aogl1D5PdUg/33TJlfhzbIKTOqWSCz5HPgjebSBRRhVrg9VhCXHYONz43y3m84nlZbv2nsI//Yb6c4ChQAe0DfZBoO7IeypO9dXAn4g== 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=BXIGBQWm3XKJzL7vA8z5tf/0t1BO0BmW9Uh55BXcncg=; b=Onk3h63xeP0+4Z7ROESaLP91i7WkGpFYQggfVciTqGj0OR7Cg+hXNZXFVVa9gNZlCivhCiZmJz7ZR2SUWu7djhGXG1eC+HaZETyOn/Qm519ofshw6Xk7McM4piCY+UjUx29PrRIbl9dITOf7UKxzs+nZr5sQilqA7k0aqRdYmbU49iG+Q957ERuJCFYQIY8fw4TcoJrFM5zr2XNskWCoq5+xLULZr0HZg2URSMUX5t15z+hOW5HfTlaD8W2biNI5DKgIcS+aUe6fO83adAdNzFEybIOUCp9WATVlM6DzWpTkqculyOuxLkg3qYh59TmCBdbeittKg9l8YrR2S5Dgag== 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=BXIGBQWm3XKJzL7vA8z5tf/0t1BO0BmW9Uh55BXcncg=; b=rceZJmkakO6DJi7xeBR4M3sv9/7bmZ5TKjg2SCD0M0O8nl8Lo4G57+osz7fcSrJI5+mZFdZ2DZAHC2IHEURAfueNWK3VM6SKPzwePHzi3xrKEBmKBzQtQRJtLjOUay8r4rUjrn7quC5aJnfU+E+TQd9q/jpCHITu0XAfFQSlnhOJnwdn8nFtTzjFXuOZkY7CwmMo/dnVIxDorDLrvEpRJvviuak06he2wsxG8L+x5nZwmSZHn47qGZq7yOGb47uvKMxjQP3DFgdMblMosxxPbDbNQHTCpzQuG4R+Uyn1f5oxUp3ZH0N0LO3O6jybmJR/vIHm4tZdlHkTVDZhy52jhw== 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 DU2PR04MB9131.eurprd04.prod.outlook.com (2603:10a6:10:2f6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 08:20:56 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2991:58a4:e308:4389]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2991:58a4:e308:4389%7]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 08:20:55 +0000 Message-ID: <9975504c-579e-48ee-751a-66c6b055a78c@suse.com> Date: Thu, 5 Jan 2023 09:20:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] RISC-V: fix JAL aliases ordering in opcode table Content-Language: en-US To: binutils@sourceware.org References: <20230104055936.1130680-1-aurelien@aurel32.net> From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0201.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a5::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_|DU2PR04MB9131:EE_ X-MS-Office365-Filtering-Correlation-Id: 3645c1c6-5890-4ea0-1ece-08daeef5c483 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PaQnFpclziLnlCWS/yPGwxXTAjq6JeUrMg2spKoSrtapnsMZhOqfHAp3SMPCbBSE9vNMoJaeb9JuvAYqO6nMzmT5vDYHKdSbo1EAEKgf9EAJDT9RM71rEQWAz3FLb4mXYESWatKBhzrM8JfEcohOc5P0XAFNFsIiuUycF7O5H2uvSyE4M+hgj3jxztlUBK7+bgqq6IMn1x/SakfqkHjrlpyuOtdgAeijGK1pSMqjf/4Z/93pnYeGGQEpUP6rEfvfvbj6xGXPOnGxft68Bo1xdSp1vnfBQ31WlR4zdI0v/zNoqU57sra0qimzTRr8J+BQUh0telWhkXaKUbncBJ11jaZmY9LiM+6CCpuZjc13w8pV/OFao/UaSaascl700p0tFvodtjOovHz08RGfUl1sw7/Caus/4CYSVGSUTVxXhWNSrf+2k84Sof0kxVghsJPOm/6/hnRvUVaUD3IrELpZPlQeomWTKnx/lObMJRIdTu2VnFSFgAMz45sABS/V6U1bLlA9Gx22b6VeawiPvSymGZUUk1vWxp/ul4mNMdNVH1lgFHaPdqqdyeeIVHIw16GVo38E92LIYqM12sgv5JgZSFerBhiRVaxKHcvmxS4QhYkYQ/UlJT/Zt7R8u58SaB+wjX+UJokOu5Bfi6Eppal9TyB5oaVjppI/KEuB4GbteYzM3H/vqodaE36AWrEzDPYw+uawocnCAJZPTGPEgA08TirUNFITB+e3HAgxg3IwKSc= 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)(136003)(376002)(346002)(39860400002)(366004)(396003)(451199015)(2616005)(83380400001)(26005)(186003)(6512007)(86362001)(31696002)(66899015)(38100700002)(36756003)(2906002)(8936002)(6916009)(316002)(5660300002)(8676002)(66476007)(66946007)(66556008)(31686004)(41300700001)(53546011)(6506007)(478600001)(6486002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?emJwZ2xzT1FtMW5UcGlkYjY4YVpqR0drM1ZaSGczZWc0STMzeEtvYXJFdjUy?= =?utf-8?B?UjhHNlRhMGdmMGI4UnArekVlenNxUVFvazIwTktRTi82L00vbmxBNFRsRDF1?= =?utf-8?B?RE5yU3Fsd0RwTVRyQjYyL3dpMlVjSExMbHF1N2lkeWpSd3YyanBhUmJDY2Zv?= =?utf-8?B?QStvS3FWNG03eWd3a1UzUTlZQ0JWb2M5QUdEMEZkSTAvd3d2RE54YW1yQjlO?= =?utf-8?B?REg2NHh2bStUbnRpcVBZTjU0N1krZXFweDE5eGJ3MGdIRVlqblVSVW5XaTI4?= =?utf-8?B?bEpzWFFuNU42S2tYR2w2S21iRU1jamNUUld0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wzNmPVKtzVvWIDEFYNzKWceim?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3645c1c6-5890-4ea0-1ece-08daeef5c483 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 08:20:55.8922 (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: XjE4h4f935QHHF7bMLz/2p2Egg6axaPuoMpD9ftfwQyU367L/qQvl+6yHzd51vU9GFqYf7hpfVfCiM+ZCEGT7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9131 X-Spam-Status: No, score=-3030.3 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.01.2023 08:56, Aurelien Jarno wrote: > On 2023-01-04 08:50, Jan Beulich via Binutils wrote: >> On 04.01.2023 06:59, Aurelien Jarno wrote: >>> Commit 839189bc932e ("RISC-V: re-arrange opcode table for consistent >>> alias handling") reorder the instructions in the opcode tables, >>> including the various JAL aliases. In particular they are not ordered >>> anymore from the most specific to the less specific one. This causes the >>> form "JAL reg, imm" to emit a relocation with the register name. This >>> breaks various things like building Linux kernel modules. >>> >>> This patch fixes the issue by restoring the original ordering of the JAL >>> aliases. >> >> I'm afraid reverting the "offending" hunk is only a workaround, as it >> would re-introduce the disassembler side issue that the patch tried to >> deal with (and which sadly looks to not be covered by anything in the >> testsuite, or else you would have noticed breakage when testing your >> change). Since I expect that in the course of table lookup it is still >> the correct entry (in particular one with two rather than just one >> operands) which is used, my suspicion is that something somewhere makes >> a silent assumption upon the (original) ordering of table entries. It >> would be that place which needs fixing then; I'll try to find time soon >> to see if I can spot where that is. > > Thanks for the analysis. Do you think you have time to get a patch with > that fix before the 2.40 release? I hope to get to looking into this tomorrow; whether that'll result in a patch I obviously can't tell yet. In any event Nelson's reply (which crossed with mine) suggests the reason for the problem to be different. Yet then still that's where the change wants to be (albeit I disagree with his proposal, yet that's without having looked at the code at all), rather than re-introducing the disassembler inconsistency. The latter would certainly be a short-term option for the impending release, if a proper solution can't be found in time or turns out too intrusive. But then the title and description would need adjustment to reflect this (e.g. it wouldn't be "fix" but maybe "restore" or "undo"). Jan