From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id 92E063858D1E for ; Sun, 15 Jan 2023 04:35:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92E063858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id 7246892009C; Sun, 15 Jan 2023 05:35:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 639FD92009B; Sun, 15 Jan 2023 04:35:22 +0000 (GMT) Date: Sun, 15 Jan 2023 04:35:22 +0000 (GMT) From: "Maciej W. Rozycki" To: Jan Beulich cc: Binutils , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Nelson Chu Subject: Re: [PATCH 1/3] RISC-V: prefer SLT{,U} aliases for SLTI{,U} In-Reply-To: <95936261-d824-9128-1be9-ba7dfe12b042@suse.com> Message-ID: References: <678b275f-1930-4a59-dfba-fe21cd548fca@suse.com> <95936261-d824-9128-1be9-ba7dfe12b042@suse.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1163.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no 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 Fri, 13 Jan 2023, Jan Beulich via Binutils wrote: > While not spelled out by the spec, gas has been supporting these aliases > virtually forever. Yet they were unused by the disassembler because of > sitting later in the table. Move the non-aliases down. I think this is going backwards. Aliases are used in disassembly to improve readability, e.g. to show `nop', rather than `c.addi zero,0' which would make anyone scratch their head, at least initially. In this case there's no improvement, but obfuscation, as you're losing the clear distinction between the register and the immediate instructions and one will have to examine the operands to spot the difference. The alternative mnemonic forms for immediate machine instructions are there (NB pinched from the MIPS assembly dialect) to make it easier for people to write handcoded assembly, especially where macros are involved, either GAS or C preprocessor ones, and not for disassembly. Conceptually they're assembly macros that expand to a single instruction rather than aliases. IOW it's not a bug that those are not considered aliases for disassembly. Likewise with the remaining patches in this series. Maciej