From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2057.outbound.protection.outlook.com [40.107.6.57]) by sourceware.org (Postfix) with ESMTPS id 8C47B3858D38 for ; Thu, 26 Jan 2023 09:35:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C47B3858D38 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=D8UrkXPHa6FMA2MaJr+/5Wgs7C8mjJizEKF3Jt9TQHIOvbCme0ODmW1n1ZnW7ocB1kISMq2HDKLqozmrQlUNQp5GRwuozUnvuOwW2IIiL07vSe9n1ixq5dM8emYmddBuDbRuQMkK/SROlF83g03PXKbO27QS10HlVtXjy3KeqLsBm1k3uUaDcJym4wnzMM50s8iYZcujSgm78OhCgAaHKXjkasnkezfyO3Yy9tSr1g432JKma956TXbXCeac6dfFwED29dlKqfYIvTqFIlteoKD9/XCK2VcYOF8Bm+aaYIX206i43Hf//pae97+ItvnjyndnQN6REY5p4M7wBZENug== 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=oAirSTbNegUJEprLHvbYd6hisBN2+us/pwC/IbiTP8s=; b=ROuHXy9aGiUh9A6ZFgb9WWikpWVX/wC1G7TjGIw/9mYCIah9KHHI0z4cbKKCe1hfZAmQPcx+LrZQgWgN3kGjAF8yz9OyBhZu30oLRpJx9gdithFN+n1NyGYVzfeJjEk9tXT3jqqeZ4Gs+t7Jm7KrscE9hxPG4jnaxPRl32C5ypzNgIfWRchA2HNHpuTKUJxuzllxc7t45pMSVtT9FHWXPXeQmIe2hKX0Wr/EfWYlfB5DMdotHJzwaM+vzqrCCxdYWPRTheuLGoFG3NqFBk27GHaMaihJu3K+4bC3+bdpKcAyg/ueSE2/OlZWtgKtipVpjkG06T3Hx+/y31H03TnOpA== 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=oAirSTbNegUJEprLHvbYd6hisBN2+us/pwC/IbiTP8s=; b=Tt1xalAGzMpjZ8Ua6X95TAy0j5yyTexs4u8Eiyt2yiK8ixRVtGx3VDl1bb1yt71c5cE0UfULf9pdhjDbdvadUixvRVGgXXL2erBAPPLPbcZZyQLVCLSU6ADYjEFoLwl6iGdtlnp+/lVgjnOnHYnd5M4hMhZI/izhl809NR+tINajacCREPLkkejg4vJdPBLJvzsSzuG0Pdz1H7pdDuhgxAwviwBzj1vnBZN+UyCEEN6B8/g0f8nmnboH6QV7cuMK7nu28R2QA8YbZ0pMQPwAd0rIIupBdSuFC1ef04jQ+nWS3S9mJoU5WBiElIB6ssyfNlAENPiqzMnTuRqyZIymRw== 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 DB8PR04MB6826.eurprd04.prod.outlook.com (2603:10a6:10:11d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Thu, 26 Jan 2023 09:35:42 +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.6043.022; Thu, 26 Jan 2023 09:35:42 +0000 Message-ID: <8745742c-bbf4-7d12-73c2-50d2d4d58f22@suse.com> Date: Thu, 26 Jan 2023 10:35:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 1/3] RISC-V: prefer SLT{,U} aliases for SLTI{,U} Content-Language: en-US To: Andrew Waterman Cc: Binutils , Palmer Dabbelt , Jim Wilson , Nelson Chu , "Maciej W. Rozycki" References: <678b275f-1930-4a59-dfba-fe21cd548fca@suse.com> <95936261-d824-9128-1be9-ba7dfe12b042@suse.com> <54e213db-3268-e7b5-6f11-09dc14a1a49e@suse.com> From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0140.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:95::12) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|DB8PR04MB6826:EE_ X-MS-Office365-Filtering-Correlation-Id: 61717868-c3b7-40a3-c08f-08daff80b146 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S2GH8uLYeejXiluZE3rsAzUojkM7o6+SlfPo1d0DRi8d8jf7zwkyPE83UZQTixMEeReulXN5baP7oB9VSogrUNhhR67+V6vED8p0gnddwJjSpjOtatopaphpCC87X55ZNaPfHpJDCpbO0El+kkGAnSLrR46jGIayx4D1+WfGMuzqFuuIBNGE1yZ/Paf5VHhzAhGPjWI+LEo6mCDdKzO/wNuOIzuFh78Zc6ZuAS+lR8y8B65ksMPviKv/dd1X423mWRsAb+5wJ9U/n9V55HsDtM3og3doqMw8sMdXLdqcoWolM47+2Jlbez3kVvwUsLU+w+nDE9q8P/lS5QpLMgmRsNGWhRCv6LP/cdYf9BTJAQdatXyDODt1yGhvgWsLNuWfomwZndjkDVkUIU3+UqsQFTh5DGowG9MeHRMONKek/DcoZauGdQqmEQTtq/wvOTwmD7+Qz2eNPLe9l53nxgrI4KTZJRIzBwkDctOue3QJPS09HoEgSjUktV7TxFTYs+J8URfAbbaPwtCCA3dK0nKdWRrn4/VYUOhbMLehUNYKD9KmDqg7TvVdVIGv+PNNr0yEaVuHPx+rN6xWMEuzwX+Co4Opet+x9z5LH5bq5Ib0kZAXrxujKNC0+RqskLkr7hSjgGFjVhrXuKmiAK9N0P6wdijkWzXlPTLT2Q4oenygerc5EdqU+5EjMydYFTjc+3lIGAsQt0rxaJccZlzkJp1rl+serYfP9y0PjUKqo7MXl2fqkahVYBOtxTodwYV705sY1NUKQAJIzPMBPy2VKwK52Q== 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:(13230025)(366004)(136003)(346002)(376002)(39860400002)(396003)(451199018)(66476007)(66556008)(66946007)(41300700001)(4326008)(8676002)(83380400001)(86362001)(31696002)(38100700002)(6486002)(966005)(54906003)(2616005)(478600001)(186003)(36756003)(26005)(6512007)(53546011)(6506007)(316002)(2906002)(66899018)(6916009)(31686004)(5660300002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWhubVRCUHRVOU90amV4MlhzV0dwQXFtYTc5UUFsK1FQSGxxMVZuWVp1clJ2?= =?utf-8?B?Tk02Z1k3WUwxRnVGY3RxOFQyU2ZrSmNrSjh6aUFjMzdIdWgzUXVRM0NKeVNw?= =?utf-8?B?a2ZSLzF6Z3JhWFF4ak1sYkJMM3JCNHBPYU50QW9wTVJVM2h3cUlpbXJvej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V1ZMVU1xQkl4bG1zTkVkazhIR0x6bnJtUk13cStT?= =?utf-8?B?YUxmempWTmp3MnY2NGhMaHdHekRwaWZYYS9qdUI0TGd1TXpzR2M3cDRQQk9O?= =?utf-8?B?YTU3Z25qeDFVZjBCYzJGTjJnek5teExIYXZmWFQrSXpRQTNrcURLbzZIamsy?= =?utf-8?Q?W9Kqp9aiAJ3C0Ai2VSFzbKxVW?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61717868-c3b7-40a3-c08f-08daff80b146 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2023 09:35:42.3165 (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: DQfCVjvO8fveICEYeWA8gINP5z84FBnwAznHrdoCAUHMu8aTNC38HoBvg4tkF5pwteTixvCtKyEIHCGBADMyMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6826 X-Spam-Status: No, score=-3029.2 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 26.01.2023 02:29, Andrew Waterman wrote: > On Wed, Jan 25, 2023 at 7:22 AM Maciej W. Rozycki wrote: >> >> On Wed, 25 Jan 2023, Jan Beulich wrote: >> >>>> This is however what these instructions have been named in the ISA and >>>> the assembly dialect. In the case of NOP, MOVE, etc. mnemonics they are >>>> significant assembly idioms (usually mentioned in the ISA manual) and >>>> there are sometimes thousands of alternative encodings that could be used >>>> to effect the same operation, but only the chosen canonical encoding is >>>> disassembled this way. >>> >>> Aren't you changing topics? Being able to use alternative encodings to >>> achieve the same effect isn't what we were talking about. >> >> No, it just gives you background as to why some encodings are given >> canonical aliases (used for disassembly) and why some are not. >> >>>> It's rather how the assembly language has been designed (FWIW the RISC-V >>>> ISA and assembly dialect have been largely inspired by the MIPS approach). >>> >>> Well, such a design imo ought to include a clear statement on uses of >>> aliases. Iirc at least the 32-bit Arm ARM is very precise about what >>> aliases exist, and it effectively mandates for at least some of them >>> that they should be use in disassembly. >>> >>> As said before, I'd be happy to see things move in about any direction, >>> just as long as the result is consistent and hence observable behavior >>> is predictable for users of the assembler and disassembler. >> >> It's been consistent so far AFAICT for the RISC-V assembly dialect (and >> for that matter for the MIPS one as well). If you disagree, then you're >> welcome to present your view, but I think the context of libopcodes and >> the binutils mailing list is not the correct place to discuss the assembly >> language syntax. You'd need to take it to the RISC-V ISA maintainters and >> then we can implement whatever they've agreed to. > > Precisely specifying the assembly syntax has been a weak spot of the > RISC-V specs, but the general philosophy has been to encourage the use > of aliases in situations that are seemingly obvious (e.g. ret vs. jalr > x0, x1, 0) and to be consistent within a family of instructions (e.g. > since add is an alias for addi, xor had better be an alias for xori). Right, and then along exactly these lines slt{,u} better were aliases of slti{,u}, with matching preference in disassembly. Hence the patch. > On the disassembly side, the philosophy has been that more > human-readable aliases should be used when appropriate (e.g. ret, not > jalr x0, x1, 0), unless -Mno-aliases is specified (in which case e.g. > jalr x0, x1, 0 should be printed). > > The right place to document this stuff is here: > https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md > (I don't own this spec, so I'd recommend reporting problems or feature > requests on the github issue tracker, rather than replying here). Hmm, I'm pretty uncomfortable with discussion of things like that in forms other than email. You may have noticed this already when I was pointing out other observations and/or inconsistencies in some of the spec. Jan