From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id DE3DD3857BAF for ; Thu, 22 Sep 2022 06:31:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE3DD3857BAF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 36B97300089; Thu, 22 Sep 2022 06:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1663828261; bh=/V3n1rN1ErEz0XEavEIB69R1iJsYGqQO6s/6hkl1S4Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=baIVd87nFCupCcSpBCNQ/8fY03mwPtiueS40QCkbk5aKeCeS/nlsgZy8BptZHwnil Y+JMaLXrth2nANc3mQ/bHHUGUUPAaD0q18WbjhyNho9TYFDbJPmWwkTQg7/Kc9ohCL EeVTdUceY4lkHyNn6zZfWvtfKd09oD8eSXGiuN9M= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH v2 2/2] RISC-V: Remove "b" operand type from disassembler Date: Thu, 22 Sep 2022 06:30:38 +0000 Message-Id: <0383bce6502271455804daa533c9d141e7c3fc98.1663828180.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,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: There are a few operand types not used by any RISC-V instructions. - Cx - Vf - Ve - [ - ] - b But most of them has a reasoning to keep them: - Cx : Same as "Ct" except it has a constraint to have rd == rs2 (similar to "Cw"). Although it hasn't used, its role is clear enough to implement a new instruction with this operand type. - Vf, Ve : Used by vector AMO instructions (not ratified and real instructions are not upstreamed yet). - [, ] : Unused tokenization symbols. Reserving them is not harmful and a vendor may use this symbol for special purposes. ... except "b". I could not have found any reference to this operand type except it works like the "s" operand type. Historically, it seems... it's just unused from the beginning. Its role is not clear either. On such cases, we should vacate this room for the new operand type with much clearer roles. opcodes/ChangeLog: * riscv-dis.c (print_insn_args): Remove 'b' operand type. --- opcodes/riscv-dis.c | 1 - 1 file changed, 1 deletion(-) diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 7ae6e709290..99cebf37d9e 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -403,7 +403,6 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info print (info->stream, dis_style_immediate, "0"); break; - case 'b': case 's': if ((l & MASK_JALR) == MATCH_JALR) maybe_print_address (pd, rs1, EXTRACT_ITYPE_IMM (l), 0); -- 2.34.1