[Qemu-devel] [PATCH for-3.1] configure: Disable the nanoMIPS disassembler on big endian hosts

Philippe Mathieu-Daudé posted 1 patch 5 years, 4 months ago
Test asan passed
Test checkpatch passed
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181127145043.18545-1-f4bug@amsat.org
configure | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH for-3.1] configure: Disable the nanoMIPS disassembler on big endian hosts
Posted by Philippe Mathieu-Daudé 5 years, 4 months ago
Stefan noticed the nanoMIPS disassembler uses incorrect format strings
on big endian hosts.

On big endian hosts, the output will appear as:

$ qemu-system-mipsel -M malta -cpu I7200 -semihosting \
  -bios nanoboot.bin -d in_asm
0xbfc0000: Asm output not supported on this arch

Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 0a3c6a72c3..83a7c4746e 100755
--- a/configure
+++ b/configure
@@ -7382,7 +7382,11 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
   mips*)
     disas_config "MIPS"
     if test -n "${cxx}"; then
-      disas_config "NANOMIPS"
+      # The nanomips disassembler currently does not work correctly
+      # on big endian host.
+      if test "$bigendian" = "no" ; then
+        disas_config "NANOMIPS"
+      fi
     fi
   ;;
   moxie*)
-- 
2.17.2


Re: [Qemu-devel] [PATCH for-3.1] configure: Disable the nanoMIPS disassembler on big endian hosts
Posted by Stefan Weil 5 years, 4 months ago
Am 27.11.2018 um 15:50 schrieb Philippe Mathieu-Daudé:
> Stefan noticed the nanoMIPS disassembler uses incorrect format strings
> on big endian hosts.
>
> On big endian hosts, the output will appear as:
>
> $ qemu-system-mipsel -M malta -cpu I7200 -semihosting \
>   -bios nanoboot.bin -d in_asm
> 0xbfc0000: Asm output not supported on this arch
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  configure | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 0a3c6a72c3..83a7c4746e 100755
> --- a/configure
> +++ b/configure
> @@ -7382,7 +7382,11 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
>    mips*)
>      disas_config "MIPS"
>      if test -n "${cxx}"; then
> -      disas_config "NANOMIPS"
> +      # The nanomips disassembler currently does not work correctly
> +      # on big endian host.
> +      if test "$bigendian" = "no" ; then
> +        disas_config "NANOMIPS"
> +      fi
>      fi
>    ;;
>    moxie*)


Thank you. This looks like a patch which might be acceptable for 3.1.

Reviewed-by: Stefan Weil <sw@weilnetz.de>



Re: [Qemu-devel] [PATCH for-3.1] configure: Disable the nanoMIPS disassembler on big endian hosts
Posted by Peter Maydell 5 years, 4 months ago
On Wed, 28 Nov 2018 at 14:59, Stefan Weil <sw@weilnetz.de> wrote:
>
> Am 27.11.2018 um 15:50 schrieb Philippe Mathieu-Daudé:
> > Stefan noticed the nanoMIPS disassembler uses incorrect format strings
> > on big endian hosts.
> >
> > On big endian hosts, the output will appear as:
> >
> > $ qemu-system-mipsel -M malta -cpu I7200 -semihosting \
> >   -bios nanoboot.bin -d in_asm
> > 0xbfc0000: Asm output not supported on this arch
> >
> > Reported-by: Stefan Weil <sw@weilnetz.de>
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> >  configure | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 0a3c6a72c3..83a7c4746e 100755
> > --- a/configure
> > +++ b/configure
> > @@ -7382,7 +7382,11 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
> >    mips*)
> >      disas_config "MIPS"
> >      if test -n "${cxx}"; then
> > -      disas_config "NANOMIPS"
> > +      # The nanomips disassembler currently does not work correctly
> > +      # on big endian host.
> > +      if test "$bigendian" = "no" ; then
> > +        disas_config "NANOMIPS"
> > +      fi
> >      fi
> >    ;;
> >    moxie*)
>
>
> Thank you. This looks like a patch which might be acceptable for 3.1.
>
> Reviewed-by: Stefan Weil <sw@weilnetz.de>

It seems a bit like overkill to me. We could just mark it
as a known issue for 3.1. After all it seems unlikely that
many people will be running TCG MIPS on a big-endian host,
and if they are then "debug disassembly with some immediate
values incorrect" might be more useful than "none at all".

thanks
-- PMM