[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 11/20] disas: nanoMIPS: Clean up handling of 48-b
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v5 11/20] disas: nanoMIPS: Clean up handling of 48-bit instructions |
Date: |
Wed, 26 Dec 2018 12:06:19 +0100 |
From: Aleksandar Markovic <address@hidden>
Clean up handling of 48-bit nanoMIPS instructions:
- ADDIU[48]
- ADDIU[GP48]
- ADDIUPC[48]
- LI[48]
- LWPC[48]
- SWPC[48]
Signed-off-by: Aleksandar Markovic <address@hidden>
---
disas/nanomips.cpp | 70 ++++++++++++++++++++++++++++--------------------------
1 file changed, 36 insertions(+), 34 deletions(-)
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index e7f6975..72e2266 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
- [Qemu-devel] [PATCH v5 00/20] disas: nanoMIPS: Clean up several issues, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 01/20] disas: nanoMIPS: Fix preamble text in nanomips.* files, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 09/20] disas: nanoMIPS: Name more functions in a more descriptive way, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 07/20] disas: nanoMIPS: Fix an FP-related misnomer 2, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 12/20] disas: nanoMIPS: Clean up handling of 16-bit logic instructions, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 05/20] disas: nanoMIPS: Name some functions in a more descriptive way, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 11/20] disas: nanoMIPS: Clean up handling of 48-bit instructions,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v5 06/20] disas: nanoMIPS: Fix an FP-related misnomer 1, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 08/20] disas: nanoMIPS: Fix an FP-related misnomer 3, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 10/20] disas: nanoMIPS: Fix order of more invocations, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 02/20] disas: nanoMIPS: Remove functions that are not used, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 19/20] disas: nanoMIPS: Rename the decoder of 'gpr4.zero' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 18/20] disas: nanoMIPS: Comment the decoder of 'gpr4' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 16/20] disas: nanoMIPS: Comment the decoder of 'gpr3.src.store' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 15/20] disas: nanoMIPS: Rename the decoder of 'gpr3.src.store' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 13/20] disas: nanoMIPS: Rename the decoder of 'gpr3' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 20/20] disas: nanoMIPS: Comment the decoder of 'gpr4.zero' gpr encoding type, Aleksandar Markovic, 2018/12/26