|
From: | Jiaxun Yang |
Subject: | Re: [PATCH v2 1/1] disas: mips: Add Loongson 2F disassembler |
Date: | Sun, 5 Jul 2020 22:24:19 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
在 2020/7/5 4:04, Philippe Mathieu-Daudé 写道:
Hi Stefan, On 7/3/20 12:44 PM, Stefan Brankovic wrote:Add disassembler for Loongson 2F instruction set. Testing is done by comparing qemu disassembly output, obtained by using -d in_asm command line option, with appropriate objdump output. This disassembler is written as a generic disassembler that can be integrated into other projects. In this case, it is integrated into QEMU. One of initial key requirements was that it uses C++ as its language.Wow, this is a huge contribution! QEMU uses the libcapstone as backend to disassemble some architectures. I see the project [1] do support MIPS [2], but they don't support neither nanoMIPS nor the Loongson 2F instruction set. As the library is used by other projects, it might be worthwhile have a look if your disassembler could fit there instead. Don't take this as a negative comment please, this is the opposite: more users would be able to use your work. My comment doesn't say neither that I am against your proposal. I wanted to be sure you are aware of the capstone engine project.
Capstone relies on an ancient version of LLVM MC, however, Loongson instructions
never got upstreamed in LLVM. But... Yeah, upstream capstone looks like a better idea for the future.
I cc'ed Jiaxun Yang who has more experience with the Loongson 2F ISA and might be able to test your patch.
Thanks, will do some review and test later.
Regards, Phil. [1] http://www.capstone-engine.org/ [2] http://www.capstone-engine.org/arch.htmlSigned-off-by: Stefan Brankovic <stefan.brankovic@syrmia.com> --- MAINTAINERS | 1 + configure | 1 + disas/Makefile.objs | 1 + disas/loongson2f.cpp | 8154 +++++++++++++++++++++++++++++++++++++++ disas/loongson2f.h | 2562 ++++++++++++ include/disas/dis-asm.h | 1 + include/exec/poison.h | 1 + target/mips/cpu.c | 4 + 8 files changed, 10725 insertions(+) create mode 100644 disas/loongson2f.cpp create mode 100644 disas/loongson2f.h
[Prev in Thread] | Current Thread | [Next in Thread] |