binutils-gdb/ld/testsuite/ld-powerpc
Alan Modra 14b57c7c6a PowerPC VLE
VLE is an encoding, not a particular processor architecture, so it
isn't really proper to select insns based on PPC_OPCODE_VLE.  For
example
{"evaddw",  VX (4, 512), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}},
{"vaddubs", VX (4, 512), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}},
shows two insns that have the same encoding, both available with VLE.
Enabling both with VLE means we can't disassemble the second variant
even if -Maltivec is given rather than -Mspe.  Also, we don't check
user assembly against the processor type as well as we could.

Another problem is that when using the VLE encoding, insns from the
main ppc opcode table are not available, except those using opcode 4
and 31.  Correcting this revealed two errors in the ld testsuite,
use of "nop" and "rfmci" when -mvle.

This patch fixes those problems in the opcode table, and removes
PPCNONE.  I find a plain 0 distracts less from other values.

In addition, I've implemented code to recognize some machine values
from the apuinfo note present in ppc32 objects.  It's not a complete
disambiguation since we're lacking info to detect newer chips, but
what we have should help with disassembly.

include/
	* elf/ppc.h (APUINFO_SECTION_NAME, APUINFO_LABEL, PPC_APUINFO_ISEL,
	PPC_APUINFO_PMR, PPC_APUINFO_RFMCI, PPC_APUINFO_CACHELCK,
	PPC_APUINFO_SPE, PPC_APUINFO_EFS, PPC_APUINFO_BRLOCK,
	PPC_APUINFO_VLE: Define.
opcodes/
	* ppc-dis.c (ppc_opts): Delete extraneous parentheses.  Default
	cpu for "vle" to e500.
	* ppc-opc.c (ALLOW8_SPRG): Remove PPC_OPCODE_VLE.
	(NO371, PPCSPE, PPCISEL, PPCEFS, MULHW, DCBT_EO): Likewise.
	(PPCNONE): Delete, substitute throughout.
	(powerpc_opcodes): Remove PPCVLE from "flags".  Add to "deprecated"
	except for major opcode 4 and 31.
	(vle_opcodes <se_rfmci>): Add PPCRFMCI to flags.
bfd/
	* cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
	to match other 32-bit archs.
	* elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
	(ppc_elf_object_p): Call it.
	(ppc_elf_special_sections): Use APUINFO_SECTION_NAME.  Fix
	overlong line.
	(APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
	* elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
	* bfd-in.h (_bfd_elf_ppc_at_tls_transform,
	_bfd_elf_ppc_at_tprel_transform): Move to..
	* elf-bfd.h: ..here.
	(_bfd_elf_ppc_set_arch): Declare.
	* bfd-in2.h: Regenerate.
gas/
	* config/tc-ppc.c (PPC_APUINFO_ISEL, PPC_APUINFO_PMR,
	PPC_APUINFO_RFMCI, PPC_APUINFO_CACHELCK, PPC_APUINFO_SPE,
	PPC_APUINFO_EFS, PPC_APUINFO_BRLOCK, PPC_APUINFO_VLE): Don't define.
	(ppc_setup_opcodes): Check vle disables powerpc_opcodes overridden
	by vle_opcodes, and that vle flag doesn't enable opcodes.  Don't
	add vle_opcodes twice.
	(ppc_cleanup): Use APUINFO_SECTION_NAME and APUINFO_LABEL.
ld/
	* testsuite/ld-powerpc/apuinfo1.s: Delete nop.
	* testsuite/ld-powerpc/apuinfo-vle2.s: New.
	* testsuite/ld-powerpc/powerpc.exp: Use apuinfo-vle2.s.
2016-06-07 22:04:38 +09:30
..
addpcis.d Add assembler, disassembler and linker support for power9. 2015-11-11 19:52:52 -06:00
addpcis.s Add assembler, disassembler and linker support for power9. 2015-11-11 19:52:52 -06:00
aix52.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
aix-abs-branch-1.dd
aix-abs-branch-1.ex
aix-abs-branch-1.im
aix-abs-branch-1.nd
aix-abs-branch-1.s
aix-abs-reloc-1.ex
aix-abs-reloc-1.im
aix-abs-reloc-1.nd
aix-abs-reloc-1.od
aix-abs-reloc-1.s
aix-core-sec-1.ex
aix-core-sec-1.hd
aix-core-sec-1.s
aix-core-sec-2.ex
aix-core-sec-2.hd
aix-core-sec-2.s
aix-core-sec-3.ex
aix-core-sec-3.hd
aix-core-sec-3.s
aix-export-1-all.dd
aix-export-1-full.dd
aix-export-1a.s
aix-export-1b.s
aix-export-2.nd
aix-export-2.s
aix-gc-1-32.dd
aix-gc-1-64.dd
aix-gc-1.ex
aix-gc-1.nd
aix-gc-1.s
aix-glink-1-32.d
aix-glink-1-32.dd
aix-glink-1-64.d
aix-glink-1-64.dd
aix-glink-1.ex
aix-glink-1.s
aix-glink-2-32.dd
aix-glink-2-64.dd
aix-glink-2a.ex
aix-glink-2a.s
aix-glink-2b.s
aix-glink-2c.ex
aix-glink-2c.s
aix-glink-2d.s
aix-glink-3-32.d
aix-glink-3-64.d
aix-glink-3.dd
aix-glink-3.s
aix-glink-3a.s
aix-glink-3b.s
aix-lineno-1.s
aix-lineno-1.txt
aix-lineno-1a.dd
aix-lineno-1a.nd
aix-lineno-1b.dd
aix-lineno-1b.nd
aix-no-dup-syms-1-dso.dnd
aix-no-dup-syms-1-dso.drd
aix-no-dup-syms-1-dso.nd
aix-no-dup-syms-1-dso.rd
aix-no-dup-syms-1-rel.nd
aix-no-dup-syms-1-rel.rd
aix-no-dup-syms-1.ex
aix-no-dup-syms-1.im
aix-no-dup-syms-1a.s
aix-no-dup-syms-1b.s
aix-ref-1-32.od
aix-ref-1-64.od
aix-ref-1.s
aix-rel-1.od
aix-rel-1.s
aix-toc-1-32.dd
aix-toc-1-64.dd
aix-toc-1.ex
aix-toc-1a.s
aix-toc-1b.s
aix-weak-1-dso.dnd
aix-weak-1-dso.hd
aix-weak-1-dso.nd
aix-weak-1-gcdso.dnd
aix-weak-1-gcdso.hd
aix-weak-1-gcdso.nd
aix-weak-1-rel.hd
aix-weak-1-rel.nd
aix-weak-1.ex
aix-weak-1a.s
aix-weak-1b.s
aix-weak-2a.ex
aix-weak-2a.nd
aix-weak-2a.s
aix-weak-2b.nd
aix-weak-2b.s
aix-weak-2c.ex
aix-weak-2c.nd
aix-weak-2c.od
aix-weak-2c.s
aix-weak-3-32.d
aix-weak-3-32.dd
aix-weak-3-64.d
aix-weak-3-64.dd
aix-weak-3a.ex
aix-weak-3a.s
aix-weak-3b.ex
aix-weak-3b.s
ambiguousv1.d
ambiguousv1b.d
ambiguousv2.d
ambiguousv2b.d
apuinfo1.s PowerPC VLE 2016-06-07 22:04:38 +09:30
apuinfo2.s
apuinfo-nul1.s
apuinfo-nul.rd
apuinfo-nul.s
apuinfo-vle2.s PowerPC VLE 2016-06-07 22:04:38 +09:30
apuinfo-vle.rd
apuinfo-vle.s
apuinfo.rd
attr-gnu-4-0.s
attr-gnu-4-1.s
attr-gnu-4-2.s
attr-gnu-4-3.s
attr-gnu-4-4.s
attr-gnu-4-00.d
attr-gnu-4-01.d
attr-gnu-4-02.d
attr-gnu-4-03.d
attr-gnu-4-10.d
attr-gnu-4-11.d
attr-gnu-4-12.d
attr-gnu-4-13.d
attr-gnu-4-14.d
attr-gnu-4-20.d
attr-gnu-4-21.d
attr-gnu-4-22.d
attr-gnu-4-23.d
attr-gnu-4-24.d
attr-gnu-4-31.d
attr-gnu-4-32.d
attr-gnu-4-33.d
attr-gnu-4-34.d
attr-gnu-4-41.d
attr-gnu-8-1.s
attr-gnu-8-2.s
attr-gnu-8-3.s
attr-gnu-8-11.d
attr-gnu-8-23.d
attr-gnu-8-31.d
attr-gnu-12-1.s
attr-gnu-12-2.s
attr-gnu-12-11.d
attr-gnu-12-21.d
defsym.d
defsym.s
elfv2-2a.s
elfv2-2b.s
elfv2-2exe.d
elfv2-2so.d
elfv2.s
elfv2exe.d
elfv2so.d Fallout from "Reorder more powerpc64 sections for -z relro" 2015-07-28 18:42:43 +09:30
export-class.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
funref2.s
funref.s
funv1.s
funv2.s
oldtlslib.s
plt1.d
plt1.s
powerpc-32-export-class.rd
powerpc-32-export-class.xd
powerpc-64-export-class.rd
powerpc-64-export-class.xd
powerpc.exp PowerPC VLE 2016-06-07 22:04:38 +09:30
ppc476-shared2.d ppc476 linker workaround shared lib fixes again 2015-06-16 17:42:29 +09:30
ppc476-shared.d ppc476 linker workaround shared lib fixes again 2015-06-16 17:42:29 +09:30
ppc476-shared.lnk ppc476 linker workaround shared lib fixes 2015-06-05 20:12:11 +09:30
ppc476-shared.s ppc476 linker workaround shared lib fixes again 2015-06-16 17:42:29 +09:30
relax.d
relax.s
relaxr.d
relbrlt.d
relbrlt.s
reloc.d
reloc.s
relocsort.d Add reloc sort test 2015-08-27 23:21:21 +09:30
relocsort.s Add reloc sort test 2015-08-27 23:21:21 +09:30
sdabase2.d
sdabase2.t
sdabase.d
sdabase.s
sdabase.t
sdadyn.d
sdadyn.s
sdalib.s
startv1.s
startv2.s
symtocbase-1.s
symtocbase-2.s
symtocbase.d
tls32.d
tls32.g
tls32.s
tls32.t
tls.d
tls.g
tls.s
tls.t
tlsdll_32.s ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsdll.s ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsdll.ver ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsexe32.d
tlsexe32.g
tlsexe32.r
tlsexe32.t
tlsexe.d
tlsexe.g
tlsexe.r
tlsexe.t
tlsexetoc.d
tlsexetoc.g
tlsexetoc.r
tlsexetoc.t
tlsld32.d
tlsld32.s
tlsld.d
tlsld.s
tlslib32.s
tlslib.s
tlsmark32.d
tlsmark32.s
tlsmark.d
tlsmark.s
tlsopt1_32.d
tlsopt1_32.s
tlsopt1.d
tlsopt1.s
tlsopt2_32.d
tlsopt2_32.s
tlsopt2.d
tlsopt2.s
tlsopt3_32.d
tlsopt3_32.s
tlsopt3.d
tlsopt3.s
tlsopt4_32.d
tlsopt4_32.s
tlsopt4.d
tlsopt4.s
tlsopt5_32.d ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsopt5_32.s ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsopt5.d ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsopt5.s ld --gc-sections fail with __tls_get_addr_opt 2016-05-11 22:40:09 +09:30
tlsso32.d
tlsso32.g
tlsso32.r
tlsso32.t
tlsso.d
tlsso.g
tlsso.r
tlsso.t
tlstoc.d
tlstoc.g
tlstoc.s
tlstoc.t
tlstocso.d
tlstocso.g
tlstocso.r
tlstocso.t
tocnovar.d
tocnovar.s
tocopt2.d
tocopt2.out
tocopt2.s
tocopt3.d
tocopt3.s
tocopt4.d
tocopt4a.s
tocopt4b.s
tocopt5.d
tocopt5.s
tocopt6-inc.s Fix an opd->append index in elf64-ppc.c 2015-07-05 19:57:07 +01:00
tocopt6.d Fix an opd->append index in elf64-ppc.c 2015-07-05 19:57:07 +01:00
tocopt6a.s Fix an opd->append index in elf64-ppc.c 2015-07-05 19:57:07 +01:00
tocopt6b.s Fix an opd->append index in elf64-ppc.c 2015-07-05 19:57:07 +01:00
tocopt6c.s Fix an opd->append index in elf64-ppc.c 2015-07-05 19:57:07 +01:00
tocopt.d
tocopt.out
tocopt.s
tocvar.d
tocvar.s
vle-multiseg-1.d
vle-multiseg-1.ld
vle-multiseg-2.d
vle-multiseg-2.ld
vle-multiseg-3.d
vle-multiseg-3.ld
vle-multiseg-4.d
vle-multiseg-4.ld
vle-multiseg-5.d
vle-multiseg-5.ld
vle-multiseg-6.d
vle-multiseg-6.ld
vle-multiseg-6a.s
vle-multiseg-6b.s
vle-multiseg-6c.s
vle-multiseg-6d.s
vle-multiseg.s
vle-reloc-1.d
vle-reloc-1.s
vle-reloc-2.d
vle-reloc-2.s
vle-reloc-3.d
vle-reloc-3.s
vle-reloc-def-1.s
vle-reloc-def-2.s
vle-reloc-def-3.s
vle.ld
vxworks1-lib.dd
vxworks1-lib.nd
vxworks1-lib.rd
vxworks1-lib.s
vxworks1-lib.sd
vxworks1-lib.td
vxworks1-static.d
vxworks1.dd
vxworks1.ld
vxworks1.rd
vxworks1.s
vxworks2-static.sd
vxworks2.s
vxworks2.sd
vxworks-relax-2.rd
vxworks-relax-2.s
vxworks-relax.rd
vxworks-relax.s