public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jim Wilson <jimw@sifive.com>
To: binutils@sourceware.org
Subject: [PATCH] RISC-V: Fix minor bugs in .insn docs.
Date: Tue,  2 Jun 2020 18:38:12 -0700	[thread overview]
Message-ID: <20200603013812.2639-1-jimw@sifive.com> (raw)

This fixes some minor bugs in the docs for the .insn directive pointed out
by Frédéric Pétrot, and I added a few more cleanups since I was changing
the docs.

Tested with cross riscv{32,64}-{elf,linux} builds and viewing the docs to
ensure that they look correct.

Committed.

Jim

	gas/
	PR 26051
	* doc/c-riscv.texi (RISC-V-Formats): Add missing I format using
	simm12(rs1).  Correct S format to use simm12(rs1).  Drop SB and B
	formats using simm12(rs1).  Correct SB and B to use rs1 and rs2.
	Move B before SB.  Move J before UJ.
---
 gas/doc/c-riscv.texi | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi
index bf942c3b7e..57ba9fa3b0 100644
--- a/gas/doc/c-riscv.texi
+++ b/gas/doc/c-riscv.texi
@@ -497,6 +497,7 @@ with the @samp{.insn} pseudo directive:
 @end verbatim
 
 @item I type: .insn i opcode, func3, rd, rs1, simm12
+@itemx I type: .insn i opcode, func3, rd, simm12(rs1)
 @verbatim
 +-------------+-----+-------+----+-------------+
 |      simm12 | rs1 | func3 | rd |      opcode |
@@ -504,7 +505,7 @@ with the @samp{.insn} pseudo directive:
 31            20    15      12   7             0
 @end verbatim
 
-@item S type: .insn s opcode, func3, rd, rs1, simm12
+@item S type: .insn s opcode, func3, rs2, simm12(rs1)
 @verbatim
 +--------------+-----+-----+-------+-------------+-------------+
 | simm12[11:5] | rs2 | rs1 | func3 | simm12[4:0] |      opcode |
@@ -512,10 +513,8 @@ with the @samp{.insn} pseudo directive:
 31             25    20    15      12            7             0
 @end verbatim
 
-@item SB type: .insn sb opcode, func3, rd, rs1, symbol
-@itemx SB type: .insn sb opcode, func3, rd, simm12(rs1)
-@itemx B type: .insn s opcode, func3, rd, rs1, symbol
-@itemx B type: .insn s opcode, func3, rd, simm12(rs1)
+@item B type: .insn s opcode, func3, rs1, rs2, symbol
+@itemx SB type: .insn sb opcode, func3, rs1, rs2, symbol
 @verbatim
 +------------+--------------+-----+-----+-------+-------------+-------------+--------+
 | simm12[12] | simm12[10:5] | rs2 | rs1 | func3 | simm12[4:1] | simm12[11]] | opcode |
@@ -531,8 +530,8 @@ with the @samp{.insn} pseudo directive:
 31                          12   7             0
 @end verbatim
 
-@item UJ type: .insn uj opcode, rd, symbol
-@itemx J type: .insn j opcode, rd, symbol
+@item J type: .insn j opcode, rd, symbol
+@itemx UJ type: .insn uj opcode, rd, symbol
 @verbatim
 +------------+--------------+------------+---------------+----+-------------+
 | simm20[20] | simm20[10:1] | simm20[11] | simm20[19:12] | rd |      opcode |
-- 
2.17.1


                 reply	other threads:[~2020-06-03  1:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200603013812.2639-1-jimw@sifive.com \
    --to=jimw@sifive.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).