qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 23/24] disas/nanomips: Remove argument passing by ref


From: Milica Lazarevic
Subject: [PATCH v3 23/24] disas/nanomips: Remove argument passing by ref
Date: Mon, 12 Sep 2022 14:26:34 +0200

Replaced argument passing by reference with passing by address.

Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
 disas/nanomips.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 7e45897f9c..0b5648a7cc 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -560,7 +560,7 @@ static uint64 extract_op_code_value(const uint16 *data, int 
size)
  *      disassembly string  - on error will constain error string
  */
 static int Disassemble(const uint16 *data, char **dis,
-                     TABLE_ENTRY_TYPE & type, const Pool *table,
+                     TABLE_ENTRY_TYPE *type, const Pool *table,
                      int table_size, Dis_info *info)
 {
     for (int i = 0; i < table_size; i++) {
@@ -585,7 +585,7 @@ static int Disassemble(const uint16 *data, char **dis,
                             "disassembler failure - bad table entry");
                         return -6;
                     }
-                    type = table[i].type;
+                    *type = table[i].type;
                     *dis = dis_fn(op_code, info);
                     return table[i].instructions_size;
                 } else {
@@ -21915,7 +21915,7 @@ static int nanomips_dis(char **buf,
     uint16 bits[3] = {one, two, three};
 
     TABLE_ENTRY_TYPE type;
-    int size = Disassemble(bits, buf, type, MAJOR, 2, info);
+    int size = Disassemble(bits, buf, &type, MAJOR, 2, info);
     return size;
 }
 
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]