From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 3EAA73858D35 for ; Thu, 5 Jan 2023 07:56:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3EAA73858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=3nuJfhsrAYEm6Moca1lGjRxN67JMKYrEDLnrqBlav1o=; b=MbO5dtQnauwbJ16IYBBqYcV1lJ M0OKHk2sQQ0y57O25ptvksSghCLrraXB2gfGpqsp3YkdXhU1xah5XEwqcxZBY4s558+VIzQg8oHt8 9+nVYOBaw8QzKkU0X6q5my6rC/pL5RkfQmF43uJjrLbvVp3JrRgG8XK7J/5BxvkyQ2qCl9CxK7IT3 HebO+blAqs8nSQdymwLZyX5+E/4ebyDiLGrp7bbQg9eMVtG553bVs6HLZKltBHWNfunFrbe30BKaa LRsZJ0HfQr/MMBZyakyXfyhJq0UvHvxzVanuzqp7/NGt0ro5gLxDB2diQKqK4NZzH/fCkFiLSdrqN cc6Vxafw==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pDL6a-00GADC-Lq; Thu, 05 Jan 2023 08:56:04 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.96) (envelope-from ) id 1pDL6a-005typ-0t; Thu, 05 Jan 2023 08:56:04 +0100 Date: Thu, 5 Jan 2023 08:56:04 +0100 From: Aurelien Jarno To: Jan Beulich Cc: binutils@sourceware.org Subject: Re: [PATCH] RISC-V: fix JAL aliases ordering in opcode table Message-ID: Mail-Followup-To: Jan Beulich , binutils@sourceware.org References: <20230104055936.1130680-1-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_NONE,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 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? Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net