[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 14/24] disas/nanomips: Delete wrapper functions
From: |
Milica Lazarevic |
Subject: |
[PATCH v3 14/24] disas/nanomips: Delete wrapper functions |
Date: |
Mon, 12 Sep 2022 14:26:25 +0200 |
Following functions just wrap the decode_gpr_gpr3() function:
- encode_rs3_and_check_rs3_ge_rt3()
- encode_rs3_and_check_rs3_lt_rt3()
Therefore those have been deleted. Calls to these two functions have
been replaced with calls to decode_gpr_gpr3.
Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
---
disas/nanomips.cpp | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 634ce8d08c..b5a4adb121 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -505,20 +505,6 @@ static int64 neg_copy(uint64 d)
}
-/* strange wrapper around gpr3 */
-static uint64 encode_rs3_and_check_rs3_ge_rt3(uint64 d)
-{
-return decode_gpr_gpr3(d);
-}
-
-
-/* strange wrapper around gpr3 */
-static uint64 encode_rs3_and_check_rs3_lt_rt3(uint64 d)
-{
- return decode_gpr_gpr3(d);
-}
-
-
static uint64 encode_count3_from_count(uint64 d)
{
IMGASSERTONCE(d < 8);
@@ -2958,7 +2944,7 @@ static std::string BEQC_16_(uint64 instruction, Dis_info
*info)
uint64 rs3_value = extract_rs3_6_5_4(instruction);
uint64 u_value = extract_u_3_2_1_0__s1(instruction);
- std::string rs3 = GPR(encode_rs3_and_check_rs3_lt_rt3(rs3_value));
+ std::string rs3 = GPR(decode_gpr_gpr3(rs3_value));
std::string rt3 = GPR(decode_gpr_gpr3(rt3_value));
std::string u = ADDRESS(u_value, 2, info);
@@ -3244,7 +3230,7 @@ static std::string BNEC_16_(uint64 instruction, Dis_info
*info)
uint64 rs3_value = extract_rs3_6_5_4(instruction);
uint64 u_value = extract_u_3_2_1_0__s1(instruction);
- std::string rs3 = GPR(encode_rs3_and_check_rs3_ge_rt3(rs3_value));
+ std::string rs3 = GPR(decode_gpr_gpr3(rs3_value));
std::string rt3 = GPR(decode_gpr_gpr3(rt3_value));
std::string u = ADDRESS(u_value, 2, info);
--
2.25.1
- [PATCH v3 03/24] disas/nanomips: Delete NMD class field, (continued)
- [PATCH v3 03/24] disas/nanomips: Delete NMD class field, Milica Lazarevic, 2022/09/12
- [PATCH v3 04/24] disas/nanomips: Delete NMD class second field, Milica Lazarevic, 2022/09/12
- [PATCH v3 08/24] disas/nanomips: Remove Pool tables from the class, Milica Lazarevic, 2022/09/12
- [PATCH v3 07/24] disas/nanomips: Remove disasm methods from class, Milica Lazarevic, 2022/09/12
- [PATCH v3 09/24] disas/nanomips: Remove NMD class, Milica Lazarevic, 2022/09/12
- [PATCH v3 10/24] disas/nanomips: Move typedefs etc to nanomips.cpp, Milica Lazarevic, 2022/09/12
- [PATCH v3 11/24] disas/nanomips: Delete nanomips.h, Milica Lazarevic, 2022/09/12
- [PATCH v3 12/24] disas/nanomips: Remove #inlcude <sstream>, Milica Lazarevic, 2022/09/12
- [PATCH v3 14/24] disas/nanomips: Delete wrapper functions,
Milica Lazarevic <=
- [PATCH v3 13/24] disas/nanomips: Delete copy functions, Milica Lazarevic, 2022/09/12
- [PATCH v3 15/24] disas/nanomips: Replace std::string type, Milica Lazarevic, 2022/09/12
- [PATCH v3 16/24] disas/nanomips: Remove IMMEDIATE functions, Milica Lazarevic, 2022/09/12
- [PATCH v3 17/24] disas/nanomips: Remove CPR function, Milica Lazarevic, 2022/09/12
- [PATCH v3 18/24] disas/nanomips: Prevent memory leaking, Milica Lazarevic, 2022/09/12