aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ppc-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-03-07 11:06:15 +1030
committerAlan Modra <amodra@gmail.com>2018-03-07 16:56:39 +1030
commit52fe4420b771a0f3b4fc7c6535bbd6e9b279f775 (patch)
tree5c95445c7b005e3ffacf0c1f6af007aa50243c69 /opcodes/ppc-dis.c
parent0118219e1850a05ceb181a4f47a6906c01c17c83 (diff)
downloadgdb-52fe4420b771a0f3b4fc7c6535bbd6e9b279f775.zip
gdb-52fe4420b771a0f3b4fc7c6535bbd6e9b279f775.tar.gz
gdb-52fe4420b771a0f3b4fc7c6535bbd6e9b279f775.tar.bz2
XCOFF disassembler
xcoff (32-bit) objdump accepted but ignored -M options unless -mpowerpc was also given. This patch fixes that, leaving the default as -Mpwr for xcoff. I've also enabled more tests for xcoff targets. binutils/ * configure.ac: Add objdump_private_desc_xcoff for rs6000. * configure: Regenerate. gas/ * testsuite/gas/ppc/aix.exp: Run for rs6000 too. * testsuite/gas/ppc/ppc.exp: Run more tests for non-ELF targets. * testsuite/gas/ppc/machine.d: Don't run for PE targets. opcodes/ * disassemble.c (disassembler): Use bfd_arch_powerpc entry for bfd_arch_rs6000. * disassemble.h (print_insn_rs6000): Delete. * ppc-dis.c (powerpc_init_dialect): Handle rs6000. (disassemble_init_powerpc): Call powerpc_init_dialect for rs6000. (print_insn_rs6000): Delete.
Diffstat (limited to 'opcodes/ppc-dis.c')
-rw-r--r--opcodes/ppc-dis.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index a2cfc0b..efa7898 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -340,7 +340,10 @@ powerpc_init_dialect (struct disassemble_info *info)
dialect = ppc_parse_cpu (dialect, &sticky, "vle");
break;
default:
- dialect = ppc_parse_cpu (dialect, &sticky, "power9") | PPC_OPCODE_ANY;
+ if (info->arch == bfd_arch_powerpc)
+ dialect = ppc_parse_cpu (dialect, &sticky, "power9") | PPC_OPCODE_ANY;
+ else
+ dialect = ppc_parse_cpu (dialect, &sticky, "pwr");
break;
}
@@ -431,8 +434,7 @@ disassemble_init_powerpc (struct disassemble_info *info)
last = spe2_opcd_indices[i];
}
- if (info->arch == bfd_arch_powerpc)
- powerpc_init_dialect (info);
+ powerpc_init_dialect (info);
}
/* Print a big endian PowerPC instruction. */
@@ -451,14 +453,6 @@ print_insn_little_powerpc (bfd_vma memaddr, struct disassemble_info *info)
return print_insn_powerpc (memaddr, info, 0, get_powerpc_dialect (info));
}
-/* Print a POWER (RS/6000) instruction. */
-
-int
-print_insn_rs6000 (bfd_vma memaddr, struct disassemble_info *info)
-{
- return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
-}
-
/* Extract the operand value from the PowerPC or POWER instruction. */
static int64_t