[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c
From: |
Milica Lazarevic |
Subject: |
[PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c |
Date: |
Mon, 5 Sep 2022 11:55:22 +0200 |
Now that everything is converted to the C code, nanomips.cpp file is
renamed to "nanomips.c". Therefore, meson.build file is also changed.
The explicit cast after the call to g_malloc() is no longer needed
because the file now compiles as a C code.
Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
---
disas/meson.build | 2 +-
disas/{nanomips.cpp => nanomips.c} | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
rename disas/{nanomips.cpp => nanomips.c} (99%)
diff --git a/disas/meson.build b/disas/meson.build
index ba22f7cbcd..1977f5cd92 100644
--- a/disas/meson.build
+++ b/disas/meson.build
@@ -5,7 +5,7 @@ common_ss.add(when: 'CONFIG_HPPA_DIS', if_true: files('hppa.c'))
common_ss.add(when: 'CONFIG_M68K_DIS', if_true: files('m68k.c'))
common_ss.add(when: 'CONFIG_MICROBLAZE_DIS', if_true: files('microblaze.c'))
common_ss.add(when: 'CONFIG_MIPS_DIS', if_true: files('mips.c'))
-common_ss.add(when: 'CONFIG_NANOMIPS_DIS', if_true: files('nanomips.cpp'))
+common_ss.add(when: 'CONFIG_NANOMIPS_DIS', if_true: files('nanomips.c'))
common_ss.add(when: 'CONFIG_NIOS2_DIS', if_true: files('nios2.c'))
common_ss.add(when: 'CONFIG_RISCV_DIS', if_true: files('riscv.c'))
common_ss.add(when: 'CONFIG_SH4_DIS', if_true: files('sh4.c'))
diff --git a/disas/nanomips.cpp b/disas/nanomips.c
similarity index 99%
rename from disas/nanomips.cpp
rename to disas/nanomips.c
index 7315484464..afe9ae7cc2 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.c
@@ -525,11 +525,7 @@ static const char *GPR(uint64 reg, struct Dis_info *info)
static char *save_restore_list(uint64 rt, uint64 count, uint64 gp,
struct Dis_info *info)
{
- /*
- * Currently, this file compiles as a cpp file, so the explicit cast here
- * is necessary. Later, the cast will be removed.
- */
- char *str = (char *)g_malloc(200);
+ char *str = g_malloc(200);
str[0] = '\0';
for (uint64 counter = 0; counter != count; counter++) {
--
2.25.1
- Re: [PATCH v2 15/20] disas/nanomips: Introduce Dis_info struct, (continued)