binutils-gdb/include/opcode
Richard Sandiford dab26bf4e7 [AArch64] Make register indices be full 64-bit values
aarch64_opnd_info used bitfields to hold vector element indices,
but values were stored into those bitfields before their ranges had
been checked.  This meant large invalid indices could be silently
truncated to smaller valid indices.

The two obvious fixes were to do the range checking earlier or use
a full 64-bit field for the index.  I went for the latter for two
reasons:

      - Doing the range checking in operand_general_constraint_met_p
        seems structurally cleaner than doing it while parsing.

      - The bitfields didn't really buy us anything.  The imm field
        of the union is already 128 bits, so we can use a full int64_t
        index without growing the structure.

The patch also adds missing range checks for the elements in a register
list index.

include/
	* opcode/aarch64.h (aarch64_opnd_info): Change index fields to int64_t.

opcodes/
	* aarch64-opc.c (operand_general_constraint_met_p): Check the
	range of ldst_elemlist operands.
	(print_register_list): Use PRIi64 to print the index.
	(aarch64_print_operand): Likewise.

gas/
	* testsuite/gas/aarch64/diagnostic.s,
	testsuite/gas/aarch64/diagnostic.l: Add tests for out-of-range indices.
2016-06-28 09:21:04 +01:00
..
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 [AArch64] Make register indices be full 64-bit values 2016-06-28 09:21:04 +01:00
alpha.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
arc-func.h [ARC] 24 bit reloc and overflow detection fix. 2016-04-05 17:05:09 +02:00
arc.h [ARC] Misc minor edits/fixes 2016-06-23 09:57:42 +01:00
arm.h [ARM] Add command line option for RAS extension. 2016-06-07 09:56:42 +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
cgen.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
convex.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
cr16.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 add more extern C 2016-06-01 21:26:32 -04:00
d30v.h add more extern C 2016-06-01 21:26:32 -04:00
dlx.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
ft32.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
h8300.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
hppa.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
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 make more variables const 2016-03-22 19:16:06 -04:00
ia64.h add more extern C 2016-06-01 21:26:32 -04:00
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
m88k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
metag.h metag: add extern C to header 2016-05-26 06:12:15 -04:00
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-decode.h Change the size field of MSP430_Opcode_Decoded to a plain integer. 2016-06-14 11:41:34 -07:00
msp430.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
nds32.h Fix compile time warnings building the binutils with a gcc6 compiler. 2016-02-09 16:34:24 +00:00
nios2.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
nios2r1.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
nios2r2.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
np1.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ns32k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
pdp11.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
pn.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ppc.h add more extern C 2016-06-01 21:26:32 -04:00
pyr.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-datadep.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
score-inst.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
sparc.h bfd,opcodes: sparc: new opcode v9{c,d,e,v,m} architectures and bfd machine numbers. 2016-06-17 02:12:48 -07:00
spu-insns.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
spu.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
tahoe.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic4x.h make more variables const 2016-03-22 19:16:06 -04:00
tic6x-control-registers.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6x-insn-formats.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6x-opcode-table.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6x.h add more extern C 2016-06-01 21:26:32 -04:00
tic30.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
tic54x.h tic54x: rename typedef of struct symbol_ 2016-05-23 01:17:12 -04:00
tic80.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
tilegx.h tilegx: move TILEGX_NUM_PIPELINE_ENCODINGS to tilegx_pipeline enum 2016-06-22 05:14:08 -04:00
tilepro.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
v850.h add more extern C 2016-06-01 21:26:32 -04:00
vax.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
visium.h Add const qualifiers at various places. 2016-03-07 15:16:28 +00:00
xgate.h Copyright update for binutils 2016-01-01 23:00:01 +10:30