Skip to contentSkip to conversation

mips: always include nanomips disassembler

PATCH In review Paolo Bonzini 3 participants 3 messages Jan 10, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: always include nanomips disassembler

Since the nanomips disassembler is not C++ code anymore, it need not depend on link_language == cpp. Always include it and remove the CONFIG_NANOMIPS_DIS symbol.

Cc Philippe Mathieu-Daudé <[email protected]>
---
 disas/meson.build     | 3 +--
 include/exec/poison.h | 1 -
 meson.build           | 7 +------
 target/mips/cpu.c     | 2 --
 4 files changed, 2 insertions(+), 11 deletions(-)
disas/meson.build +1 -2
index 1977f5cd92ef..c865bdd8827f 100644
@@ -4,8 +4,7 @@ common_ss.add(when: 'CONFIG_HEXAGON_DIS', if_true: files('hexagon.c'))
 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.c'))
+common_ss.add(when: 'CONFIG_MIPS_DIS', if_true: files('mips.c', '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'))
include/exec/poison.h +0 -1
index f0959bc84ef5..140daa4a85a4 100644
@@ -74,7 +74,6 @@
 #pragma GCC poison CONFIG_M68K_DIS
 #pragma GCC poison CONFIG_MICROBLAZE_DIS
 #pragma GCC poison CONFIG_MIPS_DIS
-#pragma GCC poison CONFIG_NANOMIPS_DIS
 #pragma GCC poison CONFIG_NIOS2_DIS
 #pragma GCC poison CONFIG_PPC_DIS
 #pragma GCC poison CONFIG_RISCV_DIS
meson.build +1 -6
index 175517eafde8..bfb461d1efac 100644
@@ -2478,7 +2478,7 @@ disassemblers = {
   'x86_64' : ['CONFIG_I386_DIS'],
   'm68k' : ['CONFIG_M68K_DIS'],
   'microblaze' : ['CONFIG_MICROBLAZE_DIS'],
-  'mips' : ['CONFIG_MIPS_DIS'],
+  'mips' : [ 'CONFIG_MIPS_DIS'],
   'nios2' : ['CONFIG_NIOS2_DIS'],
   'or1k' : ['CONFIG_OPENRISC_DIS'],
   'ppc' : ['CONFIG_PPC_DIS'],
@@ -2490,11 +2490,6 @@ disassemblers = {
   'xtensa' : ['CONFIG_XTENSA_DIS'],
   'loongarch' : ['CONFIG_LOONGARCH_DIS'],
 }
-if link_language == 'cpp'
-  disassemblers += {
-    'mips' : [ 'CONFIG_MIPS_DIS', 'CONFIG_NANOMIPS_DIS'],
-  }
-endif
 
 have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
 host_kconfig = \
target/mips/cpu.c +0 -2
index c614b04607a2..a216cb0df072 100644
@@ -439,9 +439,7 @@ static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info)
         info->print_insn = print_insn_little_mips;
 #endif
     } else {
-#if defined(CONFIG_NANOMIPS_DIS)
         info->print_insn = print_insn_nanomips;
-#endif
     }
 }
 
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Paolo Bonzini

Since the nanomips disassembler is not C++ code anymore, it need not depend on link_language == cpp. Always include it and remove the CONFIG_NANOMIPS_DIS symbol.

Cc Philippe Mathieu-Daud?? <[email protected]>

The accent in Philippe's name got mangled by something

Quoted 7 lines
---
 disas/meson.build     | 3 +--
 include/exec/poison.h | 1 -
 meson.build           | 7 +------
 target/mips/cpu.c     | 2 --
 4 files changed, 2 insertions(+), 11 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 4 lines · Paolo Bonzini

Since the nanomips disassembler is not C++ code anymore, it need not depend on link_language == cpp. Always include it and remove the CONFIG_NANOMIPS_DIS symbol.

Quoted 8 lines
Cc Philippe Mathieu-Daudé <[email protected]>
---
  disas/meson.build     | 3 +--
  include/exec/poison.h | 1 -
  meson.build           | 7 +------
  target/mips/cpu.c     | 2 --
  4 files changed, 2 insertions(+), 11 deletions(-)

meson.build disassemblers = { · line 2481

Quoted 10 lines
meson.build +1 -1
index 175517eafde8..bfb461d1efac 100644
@@ -2478,7 +2478,7 @@ disassemblers = {
    'x86_64' : ['CONFIG_I386_DIS'],
    'm68k' : ['CONFIG_M68K_DIS'],
    'microblaze' : ['CONFIG_MICROBLAZE_DIS'],
-  'mips' : ['CONFIG_MIPS_DIS'],
+  'mips' : [ 'CONFIG_MIPS_DIS'],

Queue to mips-next (dropping this one-space change).

Quoted 7 lines
meson.build +0 -0
    'nios2' : ['CONFIG_NIOS2_DIS'],
    'or1k' : ['CONFIG_OPENRISC_DIS'],
    'ppc' : ['CONFIG_PPC_DIS'],
@@ -2490,11 +2490,6 @@ disassemblers = {
    'xtensa' : ['CONFIG_XTENSA_DIS'],
    'loongarch' : ['CONFIG_LOONGARCH_DIS'],
  }