All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/24] Convert nanoMIPS disassembler from C++ to C
@ 2022-09-12 12:26 Milica Lazarevic
  2022-09-12 12:26 ` [PATCH v3 01/24] disas/nanomips: Remove namespace img Milica Lazarevic
                   ` (24 more replies)
  0 siblings, 25 replies; 43+ messages in thread
From: Milica Lazarevic @ 2022-09-12 12:26 UTC (permalink / raw)
  To: thuth
  Cc: qemu-devel, cfontana, berrange, pbonzini, vince.delvecchio,
	richard.henderson, peter.maydell, djordje.todorovic, mips32r2,
	dragan.mladjenovic

Hi,

This patchset converts the nanomips disassembler to plain C. C++ features
like class, std::string type, exception handling, and function overloading
have been removed and replaced with the equivalent C code. 
===========
Changes since previous version:
    (3) disas/nanomips: Delete NMD class field
      The deletion of two NMD class fields is separated into two commits. 
      The only use of the m_requested_instruction_categories field is within
      the if statement. Also, the field always has the same value making the
      if condition false. Therefore field and its use are completely removed.
    (4) disas/nanomips: Delete NMD class second field
      The deletion of two NMD class fields is separated into two commits. The
      Dis_info struct is introduced here. The struct currently has just one 
      field, m_pc.
    (8) disas/nanomips: Remove Pool tables from the class
      Mark all Pool tables as const.
    (13) disas/nanomips: Delete copy functions
      This is a new patch compared to the previous version. There were some 
      functions of the following form:
       T f(T arg){
        return arg;
       }
      These have been deleted, and all calls to f(arg) have been replaced with
      arg.
    (14) disas/nanomips: Delete wrapper functions
      This is a new patch compared to the previous version. Functions that 
      simply wrap the other function have been deleted. Instead, we're directly
      calling the wrapped function.
    (15) disas/nanomips: Replace std::string type
      Changed the implementation of the save_restore_list function by using 
      g_strjoinv instead of strcat. 
      Changed the interface of the Disassemble function. The type of the dis 
      parameter now is a pointer to the char *(char** dis) instead of char * 
      which makes the rest of the disassembler interface easier.
    (16) disas/nanomips: Remove IMMEDIATE functions
      This is a new patch compared to the previous version. Both versions of the 
      IMMEDIATE function have been deleted. Before, we've been practically calling the
      img_format twice on the integer values, which is not necessary anymore. Therefore,
      calls to IMMEDIATE have been deleted, and the second(now the only) call to 
      img_format is slightly changed.
    (17) disas/nanomips: Remove CPR function
      This is a new patch compared to the previous version. Same as in (16); calls to 
      CPR have been deleted, and the second(now the only) call to img_format is slightly
      changed.

Regards, 
Milica

Milica Lazarevic (24):
      disas/nanomips: Remove namespace img
      disas/nanomips: Extract enums out of the NMD class
      disas/nanomips: Delete NMD class field
      disas/nanomips: Delete NMD class second field
      disas/nanomips: Remove helper methods from class
      disas/nanomips: Remove __cond methods from class
      disas/nanomips: Remove disasm methods from class
      disas/nanomips: Remove Pool tables from the class
      disas/nanomips: Remove NMD class
      disas/nanomips: Move typedefs etc to nanomips.cpp
      disas/nanomips: Delete nanomips.h
      disas/nanomips: Remove #inlcude <sstream>
      disas/nanomips: Delete copy functions
      disas/nanomips: Delete wrapper functions
      disas/nanomips: Replace std::string type
      disas/nanomips: Remove IMMEDIATE functions
      disas/nanomips: Remove CPR function
      disas/nanomips: Prevent memory leaking
      disas/nanomips: Remove function overloading
      disas/nanomips: Expand Dis_info struct
      disas/nanomips: Replace exception handling
      disas/nanomips: Replace Cpp enums for C enums
      disas/nanomips: Remove argument passing by ref
      disas/nanomips: Rename nanomips.cpp to nanomips.c

 disas/meson.build                  |    2 +-
 disas/{nanomips.cpp => nanomips.c} | 7392 +++++++++++++++++-------------------
 disas/nanomips.h                   | 1072 ------
 3 files changed, 3510 insertions(+), 4956 deletions(-)




^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2022-11-01 11:33 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 12:26 [PATCH v3 0/24] Convert nanoMIPS disassembler from C++ to C Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 01/24] disas/nanomips: Remove namespace img Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 02/24] disas/nanomips: Extract enums out of the NMD class Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 03/24] disas/nanomips: Delete NMD class field Milica Lazarevic
2022-09-13  7:50   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 04/24] disas/nanomips: Delete NMD class second field Milica Lazarevic
2022-09-13  7:51   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 05/24] disas/nanomips: Remove helper methods from class Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 06/24] disas/nanomips: Remove __cond " Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 07/24] disas/nanomips: Remove disasm " Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 08/24] disas/nanomips: Remove Pool tables from the class Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 09/24] disas/nanomips: Remove NMD class Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 10/24] disas/nanomips: Move typedefs etc to nanomips.cpp Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 11/24] disas/nanomips: Delete nanomips.h Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 12/24] disas/nanomips: Remove #inlcude <sstream> Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 13/24] disas/nanomips: Delete copy functions Milica Lazarevic
2022-09-13  7:53   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 14/24] disas/nanomips: Delete wrapper functions Milica Lazarevic
2022-09-13  7:54   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 15/24] disas/nanomips: Replace std::string type Milica Lazarevic
2022-09-13  8:00   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 16/24] disas/nanomips: Remove IMMEDIATE functions Milica Lazarevic
2022-09-13  8:03   ` Richard Henderson
2022-11-01  8:28   ` Stefan Weil via
2022-11-01  9:27     ` Philippe Mathieu-Daudé
2022-11-01 11:28       ` Stefan Weil via
2022-11-01 11:32         ` Philippe Mathieu-Daudé
2022-09-12 12:26 ` [PATCH v3 17/24] disas/nanomips: Remove CPR function Milica Lazarevic
2022-09-13  8:05   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 18/24] disas/nanomips: Prevent memory leaking Milica Lazarevic
2022-09-13  8:06   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 19/24] disas/nanomips: Remove function overloading Milica Lazarevic
2022-09-13  8:07   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 20/24] disas/nanomips: Expand Dis_info struct Milica Lazarevic
2022-09-13  8:09   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 21/24] disas/nanomips: Replace exception handling Milica Lazarevic
2022-09-13  8:12   ` Richard Henderson
2022-09-12 12:26 ` [PATCH v3 22/24] disas/nanomips: Replace Cpp enums for C enums Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 23/24] disas/nanomips: Remove argument passing by ref Milica Lazarevic
2022-09-12 12:26 ` [PATCH v3 24/24] disas/nanomips: Rename nanomips.cpp to nanomips.c Milica Lazarevic
2022-09-13  8:12   ` Richard Henderson
2022-10-27  7:25 ` [PATCH v3 0/24] Convert nanoMIPS disassembler from C++ to C Thomas Huth
2022-10-27 10:55   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.