[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 17/20] disas: nanoMIPS: Rename the decoder of 'gp
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v5 17/20] disas: nanoMIPS: Rename the decoder of 'gpr4' gpr encoding type |
Date: |
Wed, 26 Dec 2018 12:06:25 +0100 |
From: Aleksandar Markovic <address@hidden>
Rename the decoder of 'gpr4' gpr encoding type in nanoMIPS
disassembler.
Signed-off-by: Aleksandar Markovic <address@hidden>
---
disas/nanomips.cpp | 20 ++++++++++----------
disas/nanomips.h | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 9464b1e..67be70a 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -405,7 +405,7 @@ uint64 NMD::encode_gpr4_zero(uint64 d)
}
-uint64 NMD::encode_gpr4(uint64 d)
+uint64 NMD::decode_gpr_gpr4(uint64 d)
{
static uint64 register_list[] = { 8, 9, 10, 11, 4, 5, 6, 7,
16, 17, 18, 19, 20, 21, 22, 23 };
@@ -2361,8 +2361,8 @@ std::string NMD::ADDU_4X4_(uint64 instruction)
uint64 rt4_value = extract_rt4_9_7_6_5(instruction);
uint64 rs4_value = extract_rs4_4_2_1_0(instruction);
- std::string rs4 = GPR(encode_gpr4(rs4_value));
- std::string rt4 = GPR(encode_gpr4(rt4_value));
+ std::string rs4 = GPR(decode_gpr_gpr4(rs4_value));
+ std::string rt4 = GPR(decode_gpr_gpr4(rt4_value));
return img::format("ADDU %s, %s", rs4, rt4);
}
@@ -9043,9 +9043,9 @@ std::string NMD::LW_4X4_(uint64 instruction)
uint64 rs4_value = extract_rs4_4_2_1_0(instruction);
uint64 u_value = extract_u_3_8__s2(instruction);
- std::string rt4 = GPR(encode_gpr4(rt4_value));
+ std::string rt4 = GPR(decode_gpr_gpr4(rt4_value));
std::string u = IMMEDIATE(copy(u_value));
- std::string rs4 = GPR(encode_gpr4(rs4_value));
+ std::string rs4 = GPR(decode_gpr_gpr4(rs4_value));
return img::format("LW %s, %s(%s)", rt4, u, rs4);
}
@@ -10416,8 +10416,8 @@ std::string NMD::MOVEP_REV_(uint64 instruction)
uint64 rd2_value = extract_rd2_3_8(instruction);
uint64 rs4_value = extract_rs4_4_2_1_0(instruction);
- std::string rs4 = GPR(encode_gpr4(rs4_value));
- std::string rt4 = GPR(encode_gpr4(rt4_value));
+ std::string rs4 = GPR(decode_gpr_gpr4(rs4_value));
+ std::string rt4 = GPR(decode_gpr_gpr4(rt4_value));
std::string rd2 = GPR(encode_rd2_reg1(rd2_value));
std::string rs2 = GPR(encode_rd2_reg2(rd2_value));
/* !!!!!!!!!! - no conversion function */
@@ -10982,8 +10982,8 @@ std::string NMD::MUL_4X4_(uint64 instruction)
uint64 rt4_value = extract_rt4_9_7_6_5(instruction);
uint64 rs4_value = extract_rs4_4_2_1_0(instruction);
- std::string rs4 = GPR(encode_gpr4(rs4_value));
- std::string rt4 = GPR(encode_gpr4(rt4_value));
+ std::string rs4 = GPR(decode_gpr_gpr4(rs4_value));
+ std::string rt4 = GPR(decode_gpr_gpr4(rt4_value));
return img::format("MUL %s, %s", rs4, rt4);
}
@@ -15257,7 +15257,7 @@ std::string NMD::SW_4X4_(uint64 instruction)
std::string rtz4 = GPR(encode_gpr4_zero(rtz4_value));
std::string u = IMMEDIATE(copy(u_value));
- std::string rs4 = GPR(encode_gpr4(rs4_value));
+ std::string rs4 = GPR(decode_gpr_gpr4(rs4_value));
return img::format("SW %s, %s(%s)", rtz4, u, rs4);
}
diff --git a/disas/nanomips.h b/disas/nanomips.h
index bb66c5f..0734844 100644
--- a/disas/nanomips.h
+++ b/disas/nanomips.h
@@ -109,7 +109,7 @@ private:
uint64 decode_gpr_gpr3_src_store(uint64 d);
uint64 encode_rd1_from_rd(uint64 d);
uint64 encode_gpr4_zero(uint64 d);
- uint64 encode_gpr4(uint64 d);
+ uint64 decode_gpr_gpr4(uint64 d);
uint64 encode_rd2_reg1(uint64 d);
uint64 encode_rd2_reg2(uint64 d);
--
2.7.4
- [Qemu-devel] [PATCH v5 08/20] disas: nanoMIPS: Fix an FP-related misnomer 3, (continued)
- [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
- [Qemu-devel] [PATCH v5 14/20] disas: nanoMIPS: Comment the decoder of 'gpr3' gpr encoding type, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 17/20] disas: nanoMIPS: Rename the decoder of 'gpr4' gpr encoding type,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v5 03/20] disas: nanoMIPS: Fix a function misnomer, Aleksandar Markovic, 2018/12/26
- [Qemu-devel] [PATCH v5 04/20] disas: nanoMIPS: Fix order of some invocations, Aleksandar Markovic, 2018/12/26