On 16/08/2022 02.19, Philippe Mathieu-Daudé wrote:
On 15/8/22 09:26, Milica Lazarevic wrote:
Helper methods from NMD class like NMD::renumber_registers,
NMD::decode_gpr_gpr4... etc. are removed from the class. They're now
declared global static functions.
Following helper methods have been deleted because they're not used by
the nanomips disassembler:
- NMD::encode_msbd_from_pos_and_size,
- NMD::encode_s_from_s_hi,
- NMD::neg_copy
Signed-off-by: Milica Lazarevic <milica.lazare...@syrmia.com>
---
disas/nanomips.cpp | 322 +++++++++++++++++++++------------------------
disas/nanomips.h | 144 --------------------
2 files changed, 151 insertions(+), 315 deletions(-)
-uint64 NMD::copy(uint64 d)
+static uint64 copy(uint64 d)
{
return d;
}
-int64 NMD::copy(int64 d)
+static int64 copy(int64 d)
{
return d;
}
Does that build in C? You are declaring 2 functions with the same name
but a different prototype... Shouldn't you squash patch #14 here which
rename these functions with the return value as suffix?
Up to the final patch, this is still C++, so I think it's still valid, isn't it?
Thomas