Skip to content

Commit

Permalink
disas/ppc.c: Fix little endian disassembly
Browse files Browse the repository at this point in the history
Use info->endian to select the endian of the instruction to
be disassembled.

Signed-off-by: Anton Blanchard <[email protected]>
Reviewed-by: Anthony Liguori <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
  • Loading branch information
antonblanchard authored and agraf committed Sep 2, 2013
1 parent bb429d2 commit 95f5b6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion disas/ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 95f5b6e

Please sign in to comment.