All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net, amarkovic@wavecomp.com, smarkovic@wavecomp.com
Subject: [Qemu-devel] [PATCH v4 11/11] disas: nanoMIPS: Fix comments for 48-bit instructions
Date: Mon, 24 Dec 2018 18:19:36 +0100	[thread overview]
Message-ID: <1545671976-13630-12-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1545671976-13630-1-git-send-email-aleksandar.markovic@rt-rk.com>

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Fix comments for 48-bit nanoMIPS instructions:

  - ADDIU[48]
  - ADDIU[GP48]
  - ADDIUPC[48]
  - LI[48]
  - LWPC[48]
  - SWPC[48]

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 disas/nanomips.cpp | 70 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 36 insertions(+), 34 deletions(-)

diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index a3f997f..21abd1b 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -1812,13 +1812,14 @@ std::string NMD::ADDIU_32_(uint64 instruction)
 
 
 /*
+ * ADDIU[48] rt, imm - Add Immediate (Untrapped) (rs = rt)
  *
- *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000          0010000100111111
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     00001
  *     rt -----
- *          rs -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::ADDIU_48_(uint64 instruction)
 {
@@ -1833,13 +1834,14 @@ std::string NMD::ADDIU_48_(uint64 instruction)
 
 
 /*
+ * ADDIU[GP48] rt, imm - Add Immediate (Untrapped) (rs = 28)
  *
- *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000          0010000100111111
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     00010
  *     rt -----
- *          rs -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::ADDIU_GP48_(uint64 instruction)
 {
@@ -2005,14 +2007,14 @@ std::string NMD::ADDIUPC_32_(uint64 instruction)
 
 
 /*
+ * ADDIUPC[48] rt, imm - Add Immediate (Untrapped) to PC
  *
- *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000               x1110000101
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     00011
  *     rt -----
- *          rs -----
- *               rd -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::ADDIUPC_48_(uint64 instruction)
 {
@@ -8712,14 +8714,14 @@ std::string NMD::LI_16_(uint64 instruction)
 
 
 /*
+ * LI[48] rt, s - Load Immediate
  *
- *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000               x1110000101
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     00000
  *     rt -----
- *          rs -----
- *               rd -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::LI_48_(uint64 instruction)
 {
@@ -9280,14 +9282,14 @@ std::string NMD::LWM(uint64 instruction)
 
 
 /*
+ * LWPC[48] rt, address - Load Word PC relative
  *
- *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000               x1110000101
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     01011
  *     rt -----
- *          rs -----
- *               rd -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::LWPC_48_(uint64 instruction)
 {
@@ -15496,14 +15498,14 @@ std::string NMD::SWM(uint64 instruction)
 
 
 /*
- * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Results
+ * SWPC[48] rt, address - Load Word PC relative
  *
- *   3         2         1
- *  10987654321098765432109876543210
- *  001000               00010001101
+ *         4         3         2         1
+ *  765432109876543210987654321098765432109876543210
+ *  011000     01111
  *     rt -----
- *          rs -----
- *               rd -----
+ *          s[15:0] ----------------
+ *                         s[31:16] ----------------
  */
 std::string NMD::SWPC_48_(uint64 instruction)
 {
-- 
2.7.4

      parent reply	other threads:[~2018-12-24 17:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-24 17:19 [Qemu-devel] [PATCH v4 00/11] disas: nanoMIPS: Clean up several issues Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 01/11] disas: nanoMIPS: Fix preamble text in nanomips.* files Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 02/11] disas: nanoMIPS: Remove functions that are not used Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 03/11] disas: nanoMIPS: Fix a function misnomer Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 04/11] disas: nanoMIPS: Fix order of some invocations Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 05/11] disas: nanoMIPS: Name some functions in a more descriptive way Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 06/11] disas: nanoMIPS: Fix an FP-related misnomer 1 Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 07/11] disas: nanoMIPS: Fix an FP-related misnomer 2 Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 08/11] disas: nanoMIPS: Fix an FP-related misnomer 3 Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 09/11] disas: nanoMIPS: Name more functions in a more descriptive way Aleksandar Markovic
2018-12-24 17:19 ` [Qemu-devel] [PATCH v4 10/11] disas: nanoMIPS: Fix order of more invocations Aleksandar Markovic
2018-12-24 17:19 ` Aleksandar Markovic [this message]

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=1545671976-13630-12-git-send-email-aleksandar.markovic@rt-rk.com \
    --to=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=smarkovic@wavecomp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.