* gen-aout.c (main): Fix formatting.  Close file.

	* emultempl/aix.em (_read_file): Close file at end of function.

	* gas/all/itbl-test.c (main): Close fas.

	* read.c (add_include_dir): Use xrealloc.
	* config/tc-score.c (do_macro_bcmp): Initialise inst_main.
	* config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg.

	* readelf.c (decode_arm_unwind): Initialise addr structure.
	(process_symbol_table): Free lengths.
	* srcconv.c (wr_sc): Free info.

	* chew.c (perform): Free next.
2013-10-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* readelf.c (decode_arm_unwind): Don't initialize `addr'.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA.
	(enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* mips.h (mips_operand_type): Add OP_IMM_INDEX and OP_REG_INDEX.
	(mips_reg_operand_type): Add OP_REG_MSA and OP_REG_MSA_CTRL.
	For MIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
	+T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
	For MIPS, update extension character sequences after +.
	(ASE_MSA): New define.
	(ASE_MSA64): New define.
	For microMIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
	+x, +T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
	For microMIPS, update extension character sequences after +.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* elfxx-mips.c (mips_elf_obj_tdata): Add abi_msa_bfd.
	(mips_elf_merge_obj_attributes): Set abi_msa_bfd to the first object
	file that has a Tag_GNU_MIPS_ABI_MSA attribute.
	Merge Tag_GNU_MIPS_ABI_MSA attributes.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* readelf.c (display_mips_gnu_attribute): Support Tag_GNU_MIPS_ABI_MSA.
	* doc/binutils.texi: Document -Mmsa disassembler option.
2013-10-14  Richard Sandiford  <rdsandiford@googlemail.com>
	    Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* config/tc-mips.c (options): Add OPTION_MSA and OPTION_NO_MSA.
	(md_longopts): Add mmsa and mno-msa.
	(mips_ases): Add msa.
	(RTYPE_MASK): Update.
	(RTYPE_MSA): New define.
	(OT_REG_ELEMENT): Replace with...
	(OT_INTEGER_INDEX, OT_REG_INDEX): ...these new operand types.
	(mips_operand_token): Replace reg_element with index.
	(mips_parse_argument_token): Treat vector indices as separate tokens.
	Handle register indices.
	(md_begin): Add MSA register names.
	(operand_reg_mask): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
	(convert_reg_type): Handle cases for OP_REG_MSA and OP_REG_MSA_CTRL.
	(match_mdmx_imm_reg_operand): Update accordingly.
	(match_imm_index_operand): New function.
	(match_reg_index_operand): New function.
	(match_operand): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
	(md_convert_frag): Convert bz.b/h/w/d, bnz.b/h/w/d, bz.v bnz.v.
	(md_show_usage): Print -mmsa and -mno-msa.
	* doc/as.texinfo: Document -mmsa and -mno-msa.
	* doc/c-mips.texi: Document -mmsa and -mno-msa.
	Document .set msa and .set nomsa.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* micromips-opc.c (decode_micromips_operand): Add +T, +U, +V, +W,
	+d, +e, +h, +k, +l, +n, +o, +u, +v, +w, +x,
	+~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
	(MSA): New define.
	(MSA64): New define.
	(micromips_opcodes): Add MSA instructions.
	* mips-dis.c (msa_control_names): New array.
	(mips_abi_choice): Add ASE_MSA to mips32r2.
	Remove ASE_MDMX from mips64r2.
	Add ASE_MSA and ASE_MSA64 to mips64r2.
	(parse_mips_dis_option): Handle -Mmsa.
	(print_reg): Handle cases for OP_REG_MSA and OP_REG_MSA_CTRL.
	(print_insn_arg): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
	(print_mips_disassembler_options): Print -Mmsa.
	* mips-opc.c (decode_mips_operand): Add +T, +U, +V, +W, +d, +e, +h, +k,
	+l, +n, +o, +u, +v, +w, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
	(MSA): New define.
	(MSA64): New define.
	(mips_builtin_op): Add MSA instructions.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* ld-mips-elf/attr-gnu-8-0.s, ld-mips-elf/attr-gnu-8-1.s,
	ld-mips-elf/attr-gnu-8-2.s,
	ld-mips-elf/attr-gnu-8-00.d, ld-mips-elf/attr-gnu-8-01.d,
	ld-mips-elf/attr-gnu-8-02.d, ld-mips-elf/attr-gnu-8-10.d,
	ld-mips-elf/attr-gnu-8-11.d, ld-mips-elf/attr-gnu-8-12.d,
	ld-mips-elf/attr-gnu-8-20.d, ld-mips-elf/attr-gnu-8-21.d,
	ld-mips-elf/attr-gnu-8-22.d: New.
	* ld-mips-elf/mips-elf.exp: Run new tests.
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

	* gas/mips/micromips@msa-relax.d, gas/mips/micromips@msa.d,
	gas/mips/micromips@msa64.d, gas/mips/msa-relax.d,
	gas/mips/msa-relax.l, gas/mips/msa-relax.s,
	gas/mips/msa.d, gas/mips/msa.s, gas/mips/msa64.d,
	gas/mips/msa64.s: New.
	* gas/mips/mips.exp: Run new tests.