Skip to contentSkip to conversation

configure: Disable the nanoMIPS disassembler on big endian hosts

PATCH In review Philippe Mathieu-Daudé 3 participants 3 messages Nov 27, 2018 – Nov 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Disable the nanoMIPS disassembler on big endian hosts

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
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
index 0a3c6a72c3..83a7c4746e 100755
@@ -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*)
Signature · 1 line
2.17.2
Reviewed-by on v1 1/1
#1 lore raw

Am 27.11.2018 um 15:50 schrieb Philippe Mathieu-Daudé:

Quoted 22 lines

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
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +0 -0
index 0a3c6a72c3..83a7c4746e 100755
@@ -7382,7 +7382,11 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
   mips*)
     disas_config "MIPS"

configure for i in $ARCH $TARGET_BASE_ARCH ; do · line 7392

Quoted 10 lines
configure +5 -1
     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.

#2 lore raw
Quoted 38 lines · Stefan Weil

Am 27.11.2018 um 15:50 schrieb Philippe Mathieu-Daudé:

Quoted 22 lines

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
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +0 -0
index 0a3c6a72c3..83a7c4746e 100755
@@ -7382,7 +7382,11 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
   mips*)
     disas_config "MIPS"

configure for i in $ARCH $TARGET_BASE_ARCH ; do · line 7392

Quoted 10 lines
configure +5 -1
     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.

Quoted 1 line

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