public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RISC-V: Opcode Tidying - Operands (batch 1)
@ 2022-08-07  8:00 Tsukasa OI
  2022-08-07  8:00 ` [PATCH 1/2] RISC-V: Add macro-only operands to validate_riscv_insn Tsukasa OI
  2022-08-07  8:00 ` [PATCH 2/2] RISC-V: remove "b" operand type from disassembler Tsukasa OI
  0 siblings, 2 replies; 3+ messages in thread
From: Tsukasa OI @ 2022-08-07  8:00 UTC (permalink / raw)
  To: Tsukasa OI, Nelson Chu, Kito Cheng, Palmer Dabbelt; +Cc: binutils

Hello,

This is a small patchset to clean / maintain RISC-V instruction operand types.


[PATCH 1/2]

Since `validate_riscv_insn' function lists three macro-only operand types, this
patch adds other three operands.  That means, `validate_riscv_insn' lists all
macro-only operand types with this patch.

Existing:
-   A
-   B
-   I

New in This Patch:
-   c
-   VM
-   VT

Note that `validate_riscv_insn' is called only for non-macros.  In the future,
we could reject (and make an internal error) when we encountered those macro-
only operand types on regular (non-macro) instructions.


[PATCH 2/2]

The operand type "b" has no good reasons to keep and should be removed.

-   It looks like an alias of the "s" operand type.
-   It hasn't used since the beginning.
-   Its role is not clear.

On the other hand, this patch keeps following unused operand types for now:

-   Cx     : future compressed instructions?
-   Vf, Ve : vector AMO instructions (instructions are not upstreamed
             but operand types are upstreamed already)
-   [, ]   : used by some vendors? At least, their role is clear.


Thanks,
Tsukasa




Tsukasa OI (2):
  RISC-V: Add macro-only operands to validate_riscv_insn
  RISC-V: remove "b" operand type from disassembler

 gas/config/tc-riscv.c | 3 +++
 opcodes/riscv-dis.c   | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)


base-commit: 9663a947c09f63f75491dd4ad2f38fb448142240
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-07  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07  8:00 [PATCH 0/2] RISC-V: Opcode Tidying - Operands (batch 1) Tsukasa OI
2022-08-07  8:00 ` [PATCH 1/2] RISC-V: Add macro-only operands to validate_riscv_insn Tsukasa OI
2022-08-07  8:00 ` [PATCH 2/2] RISC-V: remove "b" operand type from disassembler Tsukasa OI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).