Skip to content

Commit

Permalink
RISC-V: remove "b" operand type from disassembler
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
a4lg committed Aug 28, 2022
1 parent 19cddcf commit 6adc1f6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion opcodes/riscv-dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,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, 0, 0);
Expand Down

0 comments on commit 6adc1f6

Please sign in to comment.