binutils-gdb/include
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
..
aout Copyright update for binutils 2016-01-01 23:00:01 +10:30
cgen Copyright update for binutils 2016-01-01 23:00:01 +10:30
coff sparc-coff writing uninitialized memory 2016-06-11 17:25:35 +09:30
elf MIPS16: Add R_MIPS16_PC16_S1 branch relocation support 2016-06-28 01:29:56 +01:00
gdb sim: sim_{create_inferior,open,parse_args}: constify argv/env slightly 2016-01-06 21:48:59 -05:00
mach-o Copyright update for binutils 2016-01-01 23:00:01 +10:30
nlm Copyright update for binutils 2016-01-01 23:00:01 +10:30
opcode [AArch64] Make register indices be full 64-bit values 2016-06-28 09:21:04 +01:00
som Copyright update for binutils 2016-01-01 23:00:01 +10:30
vms Copyright update for binutils 2016-01-01 23:00:01 +10:30
COPYING Update the address and phone number of the FSF organization 2005-05-10 10:21:13 +00:00
COPYING3 * COPYING3: New file. Contains version 3 of the GNU General Public License. 2007-07-17 13:50:23 +00:00
ChangeLog [AArch64] Make register indices be full 64-bit values 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
MAINTAINERS Copyright update for binutils 2016-01-01 23:00:01 +10:30
alloca-conf.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ansidecl.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
bfdlink.h Return void from linker callbacks 2016-05-28 11:17:20 +09:30
binary-io.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
bout.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
demangle.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
dis-asm.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
dwarf2.def Copyright update for binutils 2016-01-01 23:00:01 +10:30
dwarf2.h Add DW_LANG_Rust 2016-05-17 11:11:20 -06:00
dyn-string.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
environ.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fibheap.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
filenames.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
floatformat.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fnmatch.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fopen-bin.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fopen-same.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
fopen-vms.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
gcc-c-fe.def Copyright update for binutils 2016-01-01 23:00:01 +10:30
gcc-c-interface.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
gcc-interface.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
getopt.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
hashtab.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
hp-symtab.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
ieee.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
leb128.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
libiberty.h libiberty: {count,dup,write}argv: constify argv input slightly 2016-01-05 15:25:13 -05:00
longlong.h Import changes made to files shared with the FSF GCC project. 2016-01-11 11:06:56 +00:00
lto-symtab.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
md5.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
oasys.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
objalloc.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
obstack.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
os9k.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
partition.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
plugin-api.h Add new plugin hooks to support querying section alignment and size. 2016-03-03 12:09:06 -08:00
progress.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
safe-ctype.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
sha1.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
simple-object.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
sort.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
splay-tree.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
symcat.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
timeval-utils.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
vtv-change-permission.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xregex2.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xtensa-config.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xtensa-isa-internal.h Copyright update for binutils 2016-01-01 23:00:01 +10:30
xtensa-isa.h Copyright update for binutils 2016-01-01 23:00:01 +10:30