binutils-gdb/include/opcode
Alan Modra bb6bf75e7a PowerPC @l, @h and @ha warnings, plus VLE e_li
This patch started off just adding the warnings in tc-ppc.c about
incorrect usage of @l, @h and @ha in instructions that don't have
16-bit D-form fields.  That unfortunately showed up three warnings in
ld/testsuite/ld-powerpc/vle-multiseg.s on instructions like
	e_li r3, IV_table@l+0x00
which was being assembled to
   8:	70 60 00 00 	e_li    r3,0
			a: R_PPC_ADDR16_LO	IV_table
The ADDR16_LO reloc is of course completely bogus on e_li, which has
a split 20-bit signed integer field in bits 0x1f7fff, the low 11 bit
in 0x7ff, the next 5 bits in 0x1f0000, and the high 4 bits in 0x7800.
Applying an ADDR16_LO reloc to the instruction potentially changes
the e_li instruction to e_add2i., e_add2is, e_cmp16i, e_mull2i,
e_cmpl16i, e_cmph16i, e_cmphl16i, e_or2i, e_and2i., e_or2is, e_lis,
e_and2is, or some invalid encodings.

Now there is a relocation that suits e_li, R_PPC_VLE_ADDR20, which was
added 2017-09-05 but I can't see code in gas to generate the
relocation.  In any case, VLE_ADDR20 probably doesn't have the correct
semantics for @l since ideally you'd want an @l to pair with @h or @ha
to generate a 32-bit constant.  Thus @l should only produce a 16-bit
value, I think.  So we need some more relocations to handle e_li it
seems, or as I do in this patch, modify the behaviour of existing
relocations when applied to e_li instructions.

include/
	* opcode/ppc.h (E_OPCODE_MASK, E_LI_MASK, E_LI_INSN): Define.
bfd/
	* elf32-ppc.c (ppc_elf_howto_raw <R_PPC_VLE_ADDR20>): Correct
	mask and shift value.
	(ppc_elf_vle_split16): Use E_OPCODE_MASK.  Handle e_li
	specially.
gas/
	* config/tc-ppc.c (md_assemble): Adjust relocs for VLE before
	TLS tweaks.  Handle e_li.  Warn on unexpected operand field
	for lo16/hi16/ha16 relocs.
2018-12-06 23:01:03 +10:30
..
ChangeLog-0415
ChangeLog-9103
aarch64.h [BINUTILS, AARCH64, 6/8] Add Tag getting instruction in Memory Tagging Extension 2018-11-12 13:20:58 +00:00
alpha.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arc-attrs.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arc-func.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arc.h [ARC] Update handling AUX-registers. 2018-08-06 16:41:32 +03:00
arm.h [ARM] Improve indentation of ARM architecture declarations 2018-11-13 12:19:28 +00:00
avr.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
bfin.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
cgen.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
convex.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
cr16.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
cris.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
crx.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
csky.h Add support for the C_SKY series of processors. 2018-07-30 12:24:14 +01:00
d10v.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
d30v.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dlx.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ft32.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
h8300.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
hppa.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
i386.h x86: Remove support for old (<= 2.8.1) versions of gcc 2018-03-08 06:31:52 -08:00
ia64.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
m68hc11.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
m68k.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
metag.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mips.h [MIPS] Add Loongson 2K1000 proccessor support. 2018-08-29 20:55:25 +08:00
mmix.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mn10200.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mn10300.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
moxie.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
msp430-decode.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
msp430.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
nds32.h Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
nfp.h Fix error messages in the NFP sources when building for 32-bit targets. 2018-05-15 13:28:06 +01:00
nios2.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
nios2r1.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
nios2r2.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
np1.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ns32k.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pdp11.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pj.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pn.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ppc.h PowerPC @l, @h and @ha warnings, plus VLE e_li 2018-12-06 23:01:03 +10:30
pru.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pyr.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
riscv-opc.h RISC-V: Add fence.tso instruction 2018-10-02 08:26:32 -07:00
riscv.h opcodes/riscv: Hide '.L0 ' fake symbols 2018-12-06 09:40:56 +00:00
rl78.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
rx.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
s12z.h S12Z: Move opcode header to public include directory. 2018-08-18 07:50:03 +02:00
s390.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
score-datadep.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
score-inst.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
sparc.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
spu-insns.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
spu.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic4x.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic6x-control-registers.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic6x-insn-formats.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic6x-opcode-table.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic6x.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic30.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic54x.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic80.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tilegx.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tilepro.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
v850.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
vax.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
visium.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
wasm.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
xgate.h Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30