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.
This commit is contained in:
parent
0118219e18
commit
52fe4420b7
@ -1,3 +1,8 @@
|
||||
2018-03-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure.ac: Add objdump_private_desc_xcoff for rs6000.
|
||||
* configure: Regenerate.
|
||||
|
||||
2018-03-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/22911
|
||||
|
2
binutils/configure
vendored
2
binutils/configure
vendored
@ -14599,7 +14599,7 @@ do
|
||||
avr-*-*)
|
||||
od_vectors="$od_vectors objdump_private_desc_elf32_avr"
|
||||
;;
|
||||
powerpc-*-aix*)
|
||||
powerpc*-*-aix* | rs6000-*-aix*)
|
||||
od_vectors="$od_vectors objdump_private_desc_xcoff"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
|
@ -417,7 +417,7 @@ changequote([,])dnl
|
||||
avr-*-*)
|
||||
od_vectors="$od_vectors objdump_private_desc_elf32_avr"
|
||||
;;
|
||||
powerpc-*-aix*)
|
||||
powerpc*-*-aix* | rs6000-*-aix*)
|
||||
od_vectors="$od_vectors objdump_private_desc_xcoff"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
|
@ -1,3 +1,9 @@
|
||||
2018-03-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2018-03-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
* config/tc-arm.c (md_begin): Add NULL pointer check before
|
||||
|
@ -56,7 +56,7 @@ proc do_align_test {} {
|
||||
}
|
||||
|
||||
|
||||
if [istarget powerpc-ibm-aix*] then {
|
||||
if { [istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] } then {
|
||||
|
||||
# Make sure that symbols are correctly aligned
|
||||
do_align_test
|
||||
|
@ -1,5 +1,6 @@
|
||||
#objdump: -s -j .text
|
||||
#name: PowerPC .machine test
|
||||
#not-target: *-*-pe *-*-winnt* *-*-cygwin*
|
||||
|
||||
.*
|
||||
|
||||
|
@ -18,8 +18,33 @@
|
||||
# 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.
|
||||
@ -28,84 +53,59 @@ if { [istarget powerpc64*-*-*] || [istarget *-*-elf64*]} then {
|
||||
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"
|
||||
|
@ -1,3 +1,12 @@
|
||||
2018-03-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2018-03-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* sysdep.h (opcodes_error_handler): Define.
|
||||
|
@ -375,6 +375,11 @@ disassembler (enum bfd_architecture a,
|
||||
#endif
|
||||
#ifdef ARCH_powerpc
|
||||
case bfd_arch_powerpc:
|
||||
#endif
|
||||
#ifdef ARCH_rs6000
|
||||
case bfd_arch_rs6000:
|
||||
#endif
|
||||
#if defined ARCH_powerpc || defined ARCH_rs6000
|
||||
if (big)
|
||||
disassemble = print_insn_big_powerpc;
|
||||
else
|
||||
@ -391,14 +396,6 @@ disassembler (enum bfd_architecture a,
|
||||
disassemble = print_insn_riscv;
|
||||
break;
|
||||
#endif
|
||||
#ifdef ARCH_rs6000
|
||||
case bfd_arch_rs6000:
|
||||
if (mach == bfd_mach_ppc_620)
|
||||
disassemble = print_insn_big_powerpc;
|
||||
else
|
||||
disassemble = print_insn_rs6000;
|
||||
break;
|
||||
#endif
|
||||
#ifdef ARCH_rl78
|
||||
case bfd_arch_rl78:
|
||||
disassemble = rl78_get_disassembler (abfd);
|
||||
|
@ -82,7 +82,6 @@ extern int print_insn_or1k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_pj (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_pru (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_s390 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sh64 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_spu (bfd_vma, disassemble_info *);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user