public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 1/4] RISC-V: Split Zb[abc] into commented sections
@ 2021-10-06 20:26 Philipp Tomsich
  2021-10-06 20:26 ` [PATCH v3 2/4] RISC-V: Update extension version for Zb[abc] to 1.0.0 Philipp Tomsich
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Philipp Tomsich @ 2021-10-06 20:26 UTC (permalink / raw)
  To: binutils; +Cc: Kito Cheng, Jim Wilson, Jan Beulich, Philipp Tomsich

The Zb[abc] opcodes are bundled just below the Privileged opcodes in
riscv_opcodes, possibly giving the appearance that they are part of
the Privileged spec for an uninitiated reader.  This separates them
out and adds comments above each section to clearly identify them as
Zba, Zbb or Zbc opcodes.

2021-10-04  Philipp Tomsich  <philipp.tomsich@vrull.eu>

    opcodes/
	* riscv-opc.c: Split of Zb[abc] instructions and add comments.

Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>

---

Changes in v3:
- Added patch to regroup/add comments for instructions in riscv-opc.c

 opcodes/riscv-opc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index f55a01b071c..e0621503b79 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -782,6 +782,8 @@ const struct riscv_opcode riscv_opcodes[] =
 {"sfence.vma", 0, INSN_CLASS_I,    "s",        MATCH_SFENCE_VMA, MASK_SFENCE_VMA|MASK_RS2, match_opcode, INSN_ALIAS },
 {"sfence.vma", 0, INSN_CLASS_I,    "s,t",      MATCH_SFENCE_VMA, MASK_SFENCE_VMA, match_opcode, 0 },
 {"wfi",        0, INSN_CLASS_I,    "",         MATCH_WFI, MASK_WFI, match_opcode, 0 },
+
+/* Zbb instructions */
 {"clz",        0, INSN_CLASS_ZBB,  "d,s",   MATCH_CLZ, MASK_CLZ, match_opcode, 0 },
 {"ctz",        0, INSN_CLASS_ZBB,  "d,s",   MATCH_CTZ, MASK_CTZ, match_opcode, 0 },
 {"cpop",       0, INSN_CLASS_ZBB,  "d,s",   MATCH_CPOP, MASK_CPOP, match_opcode, 0 },
@@ -813,6 +815,8 @@ const struct riscv_opcode riscv_opcodes[] =
 {"roriw",     64, INSN_CLASS_ZBB,  "d,s,<", MATCH_RORIW, MASK_RORIW, match_opcode, 0 },
 {"rorw",      64, INSN_CLASS_ZBB,  "d,s,t", MATCH_RORW, MASK_RORW, match_opcode, 0 },
 {"rorw",      64, INSN_CLASS_ZBB,  "d,s,<", MATCH_RORIW, MASK_RORIW, match_opcode, 0 },
+
+/* Zba instructions */
 {"sh1add",     0, INSN_CLASS_ZBA,  "d,s,t", MATCH_SH1ADD, MASK_SH1ADD, match_opcode, 0 },
 {"sh2add",     0, INSN_CLASS_ZBA,  "d,s,t", MATCH_SH2ADD, MASK_SH2ADD, match_opcode, 0 },
 {"sh3add",     0, INSN_CLASS_ZBA,  "d,s,t", MATCH_SH3ADD, MASK_SH3ADD, match_opcode, 0 },
@@ -823,6 +827,8 @@ const struct riscv_opcode riscv_opcodes[] =
 {"zext.w",    64, INSN_CLASS_I, "d,s",       0, (int) M_ZEXTW, match_never, INSN_MACRO },
 {"add.uw",    64, INSN_CLASS_ZBA,  "d,s,t", MATCH_ADD_UW, MASK_ADD_UW, match_opcode, 0 },
 {"slli.uw",   64, INSN_CLASS_ZBA,  "d,s,>", MATCH_SLLI_UW, MASK_SLLI_UW, match_opcode, 0 },
+
+/* Zbc instructions */
 {"clmul",      0, INSN_CLASS_ZBC,  "d,s,t", MATCH_CLMUL, MASK_CLMUL, match_opcode, 0 },
 {"clmulh",     0, INSN_CLASS_ZBC,  "d,s,t", MATCH_CLMULH, MASK_CLMULH, match_opcode, 0 },
 {"clmulr",     0, INSN_CLASS_ZBC,  "d,s,t", MATCH_CLMULR, MASK_CLMULR, match_opcode, 0 },
-- 
2.25.1


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

end of thread, other threads:[~2021-10-28  8:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 20:26 [PATCH v3 1/4] RISC-V: Split Zb[abc] into commented sections Philipp Tomsich
2021-10-06 20:26 ` [PATCH v3 2/4] RISC-V: Update extension version for Zb[abc] to 1.0.0 Philipp Tomsich
2021-10-07  4:02   ` Nelson Chu
2021-10-06 20:26 ` [PATCH v3 3/4] RISC-V: Add support for Zbs instructions Philipp Tomsich
2021-10-07  4:02   ` Nelson Chu
2021-10-07  6:57   ` Jan Beulich
2021-10-07 11:51     ` Delivery delayed:Re: " postmaster
2021-10-06 20:26 ` [PATCH v3 4/4] RISC-V: Support aliases " Philipp Tomsich
2021-10-07  4:05   ` Nelson Chu
2021-10-07  6:58   ` Jan Beulich
2021-10-07  9:13     ` Nelson Chu
2021-10-27 23:54       ` Vineet Gupta
2021-10-28  2:28         ` Nelson Chu
2021-10-28  3:24           ` Vineet Gupta
2021-10-28  8:08             ` Kito Cheng
2021-10-07 11:06     ` Delivery delayed:Re: " postmaster
2021-10-07  4:01 ` [PATCH v3 1/4] RISC-V: Split Zb[abc] into commented sections Nelson Chu

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).