disas/ppc.c: Fix little endian disassembly
authorAnton Blanchard <anton@samba.org>
Wed, 7 Aug 2013 00:47:03 +0000 (10:47 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 2 Sep 2013 08:06:41 +0000 (10:06 +0200)
Use info->endian to select the endian of the instruction to
be disassembled.

Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
disas/ppc.c

index c149506fd889a3d9ab86e55cf2f5d7c852941cde..99c4cbc3abdf9781b8f9da510653c5d20ac8d191 100644 (file)
@@ -5157,7 +5157,8 @@ int
 print_insn_ppc (bfd_vma memaddr, struct disassemble_info *info)
 {
   int dialect = (char *) info->private_data - (char *) 0;
-  return print_insn_powerpc (memaddr, info, 1, dialect);
+  return print_insn_powerpc (memaddr, info, info->endian == BFD_ENDIAN_BIG,
+                             dialect);
 }
 
 /* Print a big endian PowerPC instruction.  */