binutils-gdb/include/elf
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
..
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
aarch64.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
alpha.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
arc-reloc.def arc: Fix relocation formula for ARC_NPS_CMEM16 relocation 2016-04-20 11:45:24 +01:00
arc.h arc: Add nps400 machine type, and assembler flag. 2016-03-21 16:44:49 +00:00
arm.h Use getters/setters to access ARM branch type 2016-05-10 16:17:04 +01:00
avr.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
bfin.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
common.h Fix macro redefinition error on Solaris 2016-02-09 13:11:16 +10:30
cr16.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
cr16c.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
cris.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
crx.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
d10v.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
d30v.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
dlx.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
dwarf.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
epiphany.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
external.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fr30.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
frv.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ft32.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
h8.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
hppa.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
i370.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
i386.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
i860.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
i960.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ia64.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
internal.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ip2k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
iq2000.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
lm32.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
m32c.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
m32r.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
m68hc11.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
m68k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mcore.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mep.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
metag.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
microblaze.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mips.h add more extern C 2016-06-01 21:26:32 -04:00
mmix.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mn10200.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mn10300.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
moxie.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
msp430.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
mt.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
nds32.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
nios2.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
or1k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
pj.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ppc.h PowerPC VLE 2016-06-07 22:04:38 +09:30
ppc64.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
reloc-macros.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
rl78.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
rx.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
s390.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
score.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
sh.h add more extern C 2016-06-01 21:26:32 -04:00
sparc.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
spu.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6x-attrs.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6x.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tilegx.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tilepro.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
v850.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
vax.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
visium.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
vxworks.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
x86-64.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xc16x.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xgate.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xstormy16.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xtensa.h Copyright update for binutils 2016-01-01 23:00:01 +10:30