[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 3/3] target/mips: Add disassembler support for na
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PULL 3/3] target/mips: Add disassembler support for nanoMIPS |
Date: |
Thu, 8 Nov 2018 09:00:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 25.10.18 22:19, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <address@hidden>
>
> Add disassembler support for nanoMIPS.
>
> Reviewed-by: Stefan Markovic <address@hidden>
> Signed-off-by: Matthew Fortune <address@hidden>
> Signed-off-by: Aleksandar Markovic <address@hidden>
> ---
> MAINTAINERS | 2 +
> configure | 3 +
> disas/Makefile.objs | 1 +
> disas/nanomips.cpp | 22242
> ++++++++++++++++++++++++++++++++++++++++++++++++
> disas/nanomips.h | 1099 +++
> include/disas/bfd.h | 1 +
> include/exec/poison.h | 1 +
> target/mips/cpu.c | 13 +-
> 8 files changed, 23360 insertions(+), 2 deletions(-)
> create mode 100644 disas/nanomips.cpp
> create mode 100644 disas/nanomips.h
Hi,
the disassembler needs more work for the next QEMU release: it uses lots
of wrong format strings which will result in wrong output at least on
big endian hosts.
This patch enables the compiler errors to see those bugs:
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 1238c2ff33..62be5b6d00 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -138,7 +138,7 @@ namespace img
return a;
}
- std::string format(const char *format, ...)
+ std::string GCC_FMT_ATTR(1, 2) format(const char *format, ...)
{
char buffer[256];
va_list args;
I also noticed that the code does not use POSIX data types but
introduces its own integer types in disas/nanomips.h. This should be
fixed, too, because it prevents the use of PRIu64 etc. in the format
strings.
Regards
Stefan Weil
- Re: [Qemu-devel] [PULL 3/3] target/mips: Add disassembler support for nanoMIPS,
Stefan Weil <=