# Some PowerPC tests
#
+if { ![istarget "powerpc*-*-*"] && ![istarget "rs6000-*-*"] } then {
+ return
+}
+
+run_dump_test "regnames"
+run_dump_test "misalign"
+run_dump_test "misalign2"
+run_dump_test "machine"
+run_dump_test "simpshft"
+run_dump_test "altivec_and_spe"
+run_list_test "range" "-a32"
+run_dump_test "cell"
+
+if { [istarget "*-*-aix*"]
+ || [istarget "*-*-macos*"]
+ || [istarget "*-*-beos*"] } then {
+ run_dump_test "test1xcoff32"
+ run_dump_test "test2xcoff32"
+ run_dump_test "altivec_xcoff"
+ run_dump_test "altivec_xcoff64"
+}
+
# These tests are currently ELF specific, only because nobody has
# converted them to look for XCOFF relocations.
+if { ![is_elf_format] } then {
+ return
+}
if { [istarget powerpc64*-*-*] || [istarget *-*-elf64*]} then {
# FIXME: Pass -x to objdump as well as -Dr for astest64 and astest2_64.
run_dump_test "test1elf64"
run_dump_test "power4"
run_list_test "range64" "-a64"
-} elseif { [istarget powerpc*-*aix*] } then {
- run_dump_test "test1xcoff32"
- run_dump_test "test2xcoff32"
-} elseif { [istarget powerpc*-*-*bsd*] \
- || [istarget powerpc*-*-elf*] \
- || [istarget powerpc*-*-eabi*] \
- || [istarget powerpc*-*-sysv4*] \
- || [istarget powerpc*-*-linux*] \
- || [istarget powerpc*-*-solaris*] \
- || [istarget powerpc*-*-rtems*] } then {
+} else {
run_dump_test "astest"
run_dump_test "astest2"
run_dump_test "test1elf32"
}
-if { [istarget powerpc*-*-*] } then {
- run_dump_test "regnames"
- run_dump_test "misalign"
- run_dump_test "misalign2"
- if { [is_elf_format] } then {
- run_dump_test "machine"
- run_dump_test "common"
- run_dump_test "476"
- run_dump_test "a2"
- run_dump_test "pr21303"
- run_dump_test "vle"
- run_dump_test "vle-reloc"
- run_dump_test "vle-simple-1"
- run_dump_test "vle-simple-2"
- run_dump_test "vle-simple-3"
- run_dump_test "vle-simple-4"
- run_dump_test "vle-simple-5"
- run_dump_test "vle-simple-6"
- run_dump_test "vle-mult-ld-st-insns"
+run_dump_test "common"
+run_dump_test "476"
+run_dump_test "a2"
+run_dump_test "pr21303"
+run_dump_test "vle"
+run_dump_test "vle-reloc"
+run_dump_test "vle-simple-1"
+run_dump_test "vle-simple-2"
+run_dump_test "vle-simple-3"
+run_dump_test "vle-simple-4"
+run_dump_test "vle-simple-5"
+run_dump_test "vle-simple-6"
+run_dump_test "vle-mult-ld-st-insns"
- #fail expected until get_powerpc_dialect() patch not applied
- setup_xfail "*-*-*"
- run_dump_test "lsp"
- run_dump_test "lsp-checks"
- run_dump_test "efs"
- run_dump_test "efs2"
- run_dump_test "spe2"
- run_dump_test "spe2-checks"
- run_dump_test "spe"
+#fail expected until get_powerpc_dialect() patch not applied
+setup_xfail "*-*-*"
+run_dump_test "lsp"
- setup_xfail "*-*-*"
- run_dump_test "spe_ambiguous"
- }
+run_dump_test "lsp-checks"
+run_dump_test "efs"
+run_dump_test "efs2"
+run_dump_test "spe2"
+run_dump_test "spe2-checks"
+run_dump_test "spe"
- if { [istarget powerpc-*-*aix*] } then {
- run_dump_test "altivec_xcoff"
- run_dump_test "altivec_xcoff64"
- } else {
- run_dump_test "simpshft"
- run_dump_test "altivec"
- run_dump_test "altivec2"
- run_dump_test "altivec3"
- run_dump_test "altivec_and_spe"
- run_dump_test "booke"
- run_dump_test "e500"
- run_list_test "e500-ill" "-me500"
- run_list_test "range" "-a32"
- run_dump_test "ppc750ps"
- run_dump_test "e500mc"
- run_dump_test "e6500"
- run_dump_test "e500mc64_nop"
- run_dump_test "e5500_nop"
- run_dump_test "e6500_nop"
- run_dump_test "cell"
- run_dump_test "power4_32"
- run_dump_test "power6"
- run_dump_test "power7"
- run_dump_test "power8"
- run_dump_test "power9"
- run_dump_test "vsx"
- run_dump_test "vsx2"
- run_dump_test "vsx3"
- run_dump_test "htm"
- run_dump_test "titan"
- }
-}
+setup_xfail "*-*-*"
+run_dump_test "spe_ambiguous"
+
+run_dump_test "altivec"
+run_dump_test "altivec2"
+run_dump_test "altivec3"
+run_dump_test "booke"
+run_dump_test "e500"
+run_list_test "e500-ill" "-me500"
+run_dump_test "ppc750ps"
+run_dump_test "e500mc"
+run_dump_test "e6500"
+run_dump_test "e500mc64_nop"
+run_dump_test "e5500_nop"
+run_dump_test "e6500_nop"
+run_dump_test "power4_32"
+run_dump_test "power6"
+run_dump_test "power7"
+run_dump_test "power8"
+run_dump_test "power9"
+run_dump_test "vsx"
+run_dump_test "vsx2"
+run_dump_test "vsx3"
+run_dump_test "htm"
+run_dump_test "titan"
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;
}
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. */
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