[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/55] disas/nanomips: Remove argument passing by ref
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 37/55] disas/nanomips: Remove argument passing by ref |
Date: |
Sun, 30 Oct 2022 23:28:23 +0100 |
From: Milica Lazarevic <milica.lazarevic@syrmia.com>
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>
Message-Id: <20220912122635.74032-24-milica.lazarevic@syrmia.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
disas/nanomips.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 8b4bc910a4..9647f1a8e3 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 {
@@ -21914,7 +21914,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.37.3
- [PULL 28/55] disas/nanomips: Delete wrapper functions, (continued)
- [PULL 28/55] disas/nanomips: Delete wrapper functions, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 27/55] disas/nanomips: Delete copy functions, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 30/55] disas/nanomips: Remove IMMEDIATE functions, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 29/55] disas/nanomips: Replace std::string type, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 31/55] disas/nanomips: Remove CPR function, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 32/55] disas/nanomips: Prevent memory leaking, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 33/55] disas/nanomips: Remove function overloading, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 34/55] disas/nanomips: Expand Dis_info struct, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 35/55] disas/nanomips: Replace exception handling, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 36/55] disas/nanomips: Replace Cpp enums for C enums, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 37/55] disas/nanomips: Remove argument passing by ref,
Philippe Mathieu-Daudé <=
- [PULL 38/55] disas/nanomips: Rename nanomips.cpp to nanomips.c, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 39/55] disas/mips: Fix branch displacement for BEQZC and BNEZC, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 40/55] hw/i386/pc: Create DMA controllers in south bridges, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 41/55] hw/isa/piix3: Remove extra ';' outside of functions, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 42/55] hw/isa/piix3: Add size constraints to rcr_ops, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 44/55] hw/isa/piix3: Prefer pci_address_space() over get_system_memory(), Philippe Mathieu-Daudé, 2022/10/30
- [PULL 45/55] hw/isa/piix4: Rename wrongly named method, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 46/55] hw/ide/piix: Introduce TYPE_ macros for PIIX IDE controllers, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 43/55] hw/isa/piix3: Modernize reset handling, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 47/55] hw/isa/piix3: Remove unused include, Philippe Mathieu-Daudé, 2022/10/30