target/loongarch: Enable the disassembler for host tcg
Reuse the decodetree based disassembler from target/loongarch/ for tcg/loongarch64/. The generation of decode-insns.c.inc into ./libcommon.fa.p/ could eventually result in conflict, if any other host requires the same trick, but this is good enough for now. Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6aa89be5c5
commit
2e0d91513d
2
disas.c
2
disas.c
|
@ -198,6 +198,8 @@ static void initialize_debug_host(CPUDebug *s)
|
||||||
s->info.cap_insn_split = 6;
|
s->info.cap_insn_split = 6;
|
||||||
#elif defined(__hppa__)
|
#elif defined(__hppa__)
|
||||||
s->info.print_insn = print_insn_hppa;
|
s->info.print_insn = print_insn_hppa;
|
||||||
|
#elif defined(__loongarch__)
|
||||||
|
s->info.print_insn = print_insn_loongarch;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ gen = decodetree.process('insns.decode')
|
||||||
loongarch_ss = ss.source_set()
|
loongarch_ss = ss.source_set()
|
||||||
loongarch_ss.add(files(
|
loongarch_ss.add(files(
|
||||||
'cpu.c',
|
'cpu.c',
|
||||||
'disas.c',
|
|
||||||
))
|
))
|
||||||
loongarch_tcg_ss = ss.source_set()
|
loongarch_tcg_ss = ss.source_set()
|
||||||
loongarch_tcg_ss.add(gen)
|
loongarch_tcg_ss.add(gen)
|
||||||
|
@ -24,6 +23,8 @@ loongarch_softmmu_ss.add(files(
|
||||||
'iocsr_helper.c',
|
'iocsr_helper.c',
|
||||||
))
|
))
|
||||||
|
|
||||||
|
common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
|
||||||
|
|
||||||
loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
|
loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
|
||||||
|
|
||||||
target_arch += {'loongarch': loongarch_ss}
|
target_arch += {'loongarch': loongarch_ss}
|
||||||
|
|
Loading…
Reference in New Issue