public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] RISC-V: Opcode tidying (batch 1)
@ 2022-07-09  9:09 Tsukasa OI
  2022-07-09  9:09 ` [PATCH 1/5] RISC-V: Remove unused instruction macros Tsukasa OI
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Tsukasa OI @ 2022-07-09  9:09 UTC (permalink / raw)
  To: Tsukasa OI, Nelson Chu, Kito Cheng, Palmer Dabbelt; +Cc: binutils

Hello,

This patchset contains various tidying of RISC-V opcodes (this is the
first batch).

The background of this patchset is partially semi-automated comparison
with riscv-opc.h in GNU Binutils and encoding.h generated by
riscv-opcodes (https://github.com/riscv/riscv-opcodes).

Tracker on GitHub:
<https://github.com/a4lg/binutils-gdb/wiki/riscv_opcode_tidying_1>


[Overview of this Patchset]

1.  Instruction Name Maintainance
    a.  Remove unused instructions [PATCH 1]
    b.  Use ecall/ebreak instead of scall/sbreak
        (remove scall/sbreak-related macros) [PATCH 2]
    c.  Use fmv.w.x/fmv.x.w instead of fmv.s.x/fmv.x.s [PATCH 3]
    d.  Make alias instruction real aliases [PATCH 5]
2.  Prefer using defined mask and match values
    (applies to c.nop and fence.i) [PATCH 4]


Note that this patchset doesn't:

-   Remove existing instructions
    (just removes unused mask and match macros behind the instruction)
-   Change macro values (just names and formatting)
-   Replace riscv-opc.h with riscv-opcodes generated one.


If you use riscv-opcodes for new instructions (copy portions of
encoding.h to riscv-opc.h), porting new instruction will be easy and the
result will be more consistent.  I tried this approach on upcoming
Zihintntl patchset and it worked pretty well.

This patchset is only about refactoring and maintainance.
Nothing functional.

Thanks,
Tsukasa




Tsukasa OI (5):
  RISC-V: Remove unused instruction macros
  RISC-V: Complete tidying up with SCALL and SBREAK
  RISC-V: Tidying up with fmv.w.x and fmv.x.w
  RISC-V: Use defined mask and match values
  RISC-V: Make alias instructions aliases

 include/opcode/riscv-opc.h | 47 +++++---------------------------------
 opcodes/riscv-opc.c        | 18 +++++++--------
 sim/riscv/sim-main.c       |  6 ++---
 3 files changed, 18 insertions(+), 53 deletions(-)


base-commit: d2acd4b0c5bab349aaa152d60268bc144634a844
-- 
2.34.1


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

end of thread, other threads:[~2022-11-18  2:09 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09  9:09 [PATCH 0/5] RISC-V: Opcode tidying (batch 1) Tsukasa OI
2022-07-09  9:09 ` [PATCH 1/5] RISC-V: Remove unused instruction macros Tsukasa OI
2022-07-09  9:09 ` [PATCH 2/5] RISC-V: Complete tidying up with SCALL and SBREAK Tsukasa OI
2022-07-09  9:09 ` [PATCH 3/5] RISC-V: Tidying up with fmv.w.x and fmv.x.w Tsukasa OI
2022-07-09  9:09 ` [PATCH 4/5] RISC-V: Use defined mask and match values Tsukasa OI
2022-07-09  9:09 ` [PATCH 5/5] RISC-V: Make alias instructions aliases Tsukasa OI
2022-10-19 13:11 ` [PATCH v2 0/8] RISC-V: Various opcode tidying (batch 1) Tsukasa OI
2022-10-19 13:11   ` [PATCH v2 1/8] RISC-V: Add a space at the end of pinfo Tsukasa OI
2022-10-19 13:11   ` [PATCH v2 2/8] RISC-V: Fix obvious misalignments ('Zbb'/'Zba') Tsukasa OI
2022-10-19 13:11   ` [PATCH v2 3/8] RISC-V: Remove spaces in opcode entries Tsukasa OI
2022-10-19 13:11   ` [PATCH v2 4/8] RISC-V: Remove unused instruction macros Tsukasa OI
2022-10-19 13:11   ` [PATCH v2 5/8] RISC-V: Complete tidying up with SCALL and SBREAK Tsukasa OI
2022-10-19 13:12   ` [PATCH v2 6/8] RISC-V: Tidying up with fmv.w.x and fmv.x.w Tsukasa OI
2022-10-19 13:12   ` [PATCH v2 7/8] RISC-V: Make alias instructions aliases Tsukasa OI
2022-10-19 13:12   ` [PATCH v2 8/8] RISC-V: Use defined mask and match values Tsukasa OI
2022-11-05 11:51   ` [PING^1][PATCH v2 0/8] RISC-V: Various opcode tidying (batch 1) Tsukasa OI
2022-11-15  4:31   ` [PATCH v3 " Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 1/8] RISC-V: Add a space at the end of pinfo Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 2/8] RISC-V: Fix obvious misalignments ('Zbb'/'Zba') Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 3/8] RISC-V: Remove spaces in opcode entries Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 4/8] RISC-V: Remove unused instruction macros Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 5/8] RISC-V: Complete tidying up with SCALL and SBREAK Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 6/8] RISC-V: Tidying up with fmv.w.x and fmv.x.w Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 7/8] RISC-V: Make alias instructions aliases Tsukasa OI
2022-11-15  4:31     ` [PATCH v3 8/8] RISC-V: Use defined mask and match values Tsukasa OI
2022-11-18  2:07     ` [PATCH v4 0/8] RISC-V: Various opcode tidying (batch 1) Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 1/8] RISC-V: Add a space at the end of pinfo Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 2/8] RISC-V: Fix obvious misalignments ('Zbb'/'Zba') Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 3/8] RISC-V: Remove spaces in opcode entries Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 4/8] RISC-V: Remove unused instruction macros Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 5/8] RISC-V: Complete tidying up with SCALL and SBREAK Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 6/8] RISC-V: Tidying up with fmv.w.x and fmv.x.w Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 7/8] RISC-V: Make alias instructions aliases Tsukasa OI
2022-11-18  2:07       ` [PATCH v4 8/8] RISC-V: Use defined mask and match values 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).