Commit Graph

8723 Commits

Author SHA1 Message Date
Maciej W. Rozycki fa9d2bd6b8 S12Z/GAS: Correct a signed vs unsigned comparison error with GCC 4.1
Fix a build error:

cc1: warnings being treated as errors
.../gas/config/tc-s12z.c: In function 'lex_opr':
.../gas/config/tc-s12z.c:617: warning: comparison between signed and unsigned
.../gas/config/tc-s12z.c:624: warning: comparison between signed and unsigned
make[4]: *** [config/tc-s12z.o] Error 1

observed with GCC 4.1.2 with the `s12z-elf' target.

Here we have a constant assembly instruction operand, whose value is
within the 24-bit unsigned range, to be placed in a machine instruction
such as to use the least space-consuming encoding.  So the sign of that
value does not matter, because signed values are out of range and are
not supposed to appear here, and we only have this warning here because
the `X_add_number' member of `struct expressionS' is of the `offsetT'
type, which is signed.

Use an auxiliary variable of an unsigned data type then, observing that
both `offsetT' and `valueT' have the same width, as they correspond to
`bfd_signed_vma' and `bfd_vma' respectively.

	gas/
	* config/tc-s12z.c (lex_opr): Use an auxiliary unsigned variable
	in encoding a constant operand.
2018-09-20 15:49:01 +01:00
Maciej W. Rozycki 16de26a611 PPC/GAS: Correct a signed vs unsigned comparison error with GCC 4.1
Fix a build error:

cc1: warnings being treated as errors
.../gas/config/tc-ppc.c: In function 'ppc_dwsect':
.../gas/config/tc-ppc.c:4091: warning: comparison between signed and unsigned
make[4]: *** [config/tc-ppc.o] Error 1

observed with GCC 4.1.2 with the `powerpc-beos' target.

Here `flag' identifies the type of a DWARF section, as used with the the
first operand to the `.dwsect' pseudo-op, and has no notion of a sign,
or for that matter being arithmetic in the first place[1].  We already
handle this correctly with the `flag' member of the `xcoff_dwsect_name'
structure, however not in the local variable used in GAS to hold the
parsed value of said `.dwsect' pseudo-op's operand.

Use an unsigned data type in GAS then too, observing that both `offsetT'
and `valueT' have the same width, as they correspond to `bfd_signed_vma'
and `bfd_vma' respectively.

References:

[1] "AIX Version 7.2: Assembler Language Reference", IBM Corporation
    2015, 2018, Section ".dwsect pseudo-op", pp. 531-532

	gas/
	* config/tc-ppc.c (ppc_dwsect): Use `valueT' rather than
	`offsetT' as the type of `flag'.
2018-09-20 15:49:01 +01:00
Maciej W. Rozycki 53b6d6f5b2 ARC: Fix build errors with large constants and C89
Fix build errors:

cc1: warnings being treated as errors
In file included from .../opcodes/arc-opc.c:2630:
.../opcodes/arc-nps400-tbl.h:38: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:38: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:41: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:41: warning: integer constant is too large for 'long' type
[...]
.../opcodes/arc-nps400-tbl.h:712: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:712: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:715: warning: integer constant is too large for 'long' type
.../opcodes/arc-nps400-tbl.h:715: warning: integer constant is too large for 'long' type
make[4]: *** [arc-opc.lo] Error 1

and:

cc1: warnings being treated as errors
.../gas/config/tc-arc.c: In function 'md_number_to_chars_midend':
.../gas/config/tc-arc.c:802: warning: integer constant is too large for 'long' type
.../gas/config/tc-arc.c:810: warning: integer constant is too large for 'long' type
make[4]: *** [config/tc-arc.o] Error 1

observed with GCC 4.1.2 and presumably other C89 compilers with the
`arc-elf' and `arc-linux-gnu' targets, caused by the use of constants
the values of which are outside the range of the `int' type (or the
`long' type if it is of the same with).  In the C89 language standard
such constants are not implicitly converted to a wider type and an
explicit suffix is required for such constants.

Add a `ull' suffix then as with such constants used in other ports.

	gas/
	* config/tc-arc.c (md_number_to_chars_midend): Append `ull' to
	large constants.

	opcodes/
	* arc-nps400-tbl.h: Append `ull' to large constants throughout.
2018-09-20 15:49:00 +01:00
Nick Clifton fbaf61ad52 Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream!
We have not only removed all unsupported and obsolete code, but also supported lost of new features,
including better link-time relaxations and TLS implementations. Besides, the files generated by the
newly assembler and linker usually get higher performance and more optimized code size.

ld	* emultempl/nds32elf.em (hyper_relax): New variable.
	(nds32_elf_create_output_section_statements):
	the parameters of bfd_elf32_nds32_set_target_option
	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
	PARSE_AND_LIST_ARGS_CASES): Add new option --mhyper-relax.
	* emultempl/nds32elf.em (nds32_elf_after_open): Updated.
	* emultempl/nds32elf.em (tls_desc_trampoline): New variable.
	* (nds32_elf_create_output_section_statements): Updated.
	* (nds32_elf_after_parse): Disable relaxations when PIC is enable.
	* (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
	PARSE_AND_LIST_ARGS_CASES): Add new option --m[no-]tlsdesc-trampoline.

include	* elf/nds32.h: Remove the unused target features.
	* dis-asm.h (disassemble_init_nds32): Declared.
	* elf/nds32.h (E_NDS32_NULL): Removed.
	(E_NDS32_HAS_DSP_INST, E_NDS32_HAS_ZOL): New.
	* opcode/nds32.h: Ident.
	(N32_SUB6, INSN_LW): New macros.
	(enum n32_opcodes): Updated.
	* elf/nds32.h: Doc fixes.
	* elf/nds32.h: Add R_NDS32_LSI.
	* elf/nds32.h: Add new relocations for TLS.

gas 	* config/tc-nds32.c: Remove the unused target features.
	(nds32_relax_relocs, md_pseudo_table, nds32_elf_record_fixup_exp,
	nds32_set_elf_flags_by_insn, nds32_insert_relax_entry,
	nds32_apply_fix): Likewise.
	(nds32_no_ex9_begin): Removed.
	* config/tc-nds32.c (add_mapping_symbol_for_align,
	make_mapping_symbol, add_mapping_symbol): New functions.
	* config/tc-nds32.h (enum mstate): New.
	(nds32_segment_info_type): Likewise.
	* configure.ac (--enable-dsp-ext, --enable-zol-ext): New options.
	* config.in: Regenerated.
	* configure: Regenerated.
	* config/tc-nds32.c (nds32_dx_regs):
	Set the value according to the configuration.
	(nds32_perf_ext, nds32_perf_ext2, nds32_string_ext, nds32_audio_ext):
	Likewise.
	(nds32_dsp_ext): New variable. Set the value according to the
	configuration.
	(nds32_zol_ext): Likewise.
	(asm_desc, nds32_pseudo_opcode_table): Make them static.
	(nds32_set_elf_flags_by_insn): Updated.
	(nds32_check_insn_available): Updated.
	(nds32_str_tolower): New function.
	* config/tc-nds32.c (relax_table): Updated.
	(md_begin): Updated.
	(md_assemble): Use XNEW macro to allocate space for `insn.info',
	and then remember to free it.
	(md_section_align): Cast (-1) to ValueT.
	(nds32_get_align): Cast (~0U) to addressT.
	(nds32_relax_branch_instructions): Updated.
	(md_convert_frag): Add new local variable `final_r_type'.
	(invalid_prev_frag): Add new bfd_boolean parameter `relax'.
	All callers changed.
	* config/tc-nds32.c (struct nds32_relocs_pattern): Add `insn' field.
	(struct nds32_hint_map): Add `option_list' field.
	(struct suffix_name, suffix_table): Remove the unused `pic' field.
	(do_pseudo_b, do_pseudo_bal): Remove the suffix checking.
	(do_pseudo_la_internal, do_pseudo_pushpopm): Indent.
	(relax_hint_bias, relax_hint_id_current): New static variables.
	(reset_bias, relax_hint_begin): New variables.
	(nds_itoa): New function.
	(CLEAN_REG, GET_OPCODE): New macros.
	(struct relax_hint_id): New.
	(nds32_relax_hint): For .relax_hint directive, we can use `begin'
	and `end' to mark the relax pattern without giving exactly id number.
	(nds32_elf_append_relax_relocs): Handle the case that the .relax_hint
	directives are attached to pseudo instruction.
	(nds32_elf_save_pseudo_pattern): Change the second parameter from
	instruction's opcode to byte code.
	(nds32_elf_build_relax_relation): Add new bfd_boolean parameter
	`pseudo_hint'.
	(nds32_lookup_pseudo_opcode): Fix the overflow issue.
	(enum nds32_insn_type): Add N32_RELAX_ALU1 and N32_RELAX_16BIT.
	(nds32_elf_record_fixup_exp, relax_ls_table, hint_map,
	nds32_find_reloc_table, nds32_match_hint_insn, nds32_parse_name):
	Updated.
	* config/tc-nds32.h (MAX_RELAX_NUM): Extend it to 6.
	(enum nds32_relax_hint_type): Merge NDS32_RELAX_HINT_LA and
	NDS32_RELAX_HINT_LS into NDS32_RELAX_HINT_LALS. Add
	NDS32_RELAX_HINT_LA_PLT, NDS32_RELAX_HINT_LA_GOT and
	NDS32_RELAX_HINT_LA_GOTOFF.
	* config/tc-nds32.h (relax_ls_table): Add floating load/store
	to gp relax pattern.
	(hint_map, nds32_find_reloc_table): Likewise.
	* configure.ac: Define NDS32_LINUX_TOOLCHAIN.
	* configure: Regenerated.
	* config.in: Regenerated.
	* config/tc-nds32.h (enum nds32_ramp): Updated.
	(enum nds32_relax_hint_type): Likewise.
	* config/tc-nds32.c: Include "errno.h" and "limits.h".
	(relax_ls_table): Add TLS relax patterns.
	(nds32_elf_append_relax_relocs): Attach BFD_RELOC_NDS32_GROUP on
	each instructions of TLS patterns.
	(nds32_elf_record_fixup_exp): Updated.
	(nds32_apply_fix): Likewise.
	(suffix_table): Add TLSDESC suffix.

binutils* testsuite/binutils-all/objcopy.exp: Set the unsupported reloc number
	from 215 to 255 for NDS32.

bfd	* elf32-nds32.c (nds32_elf_relax_loadstore):
	Remove the unused target features.
	(bfd_elf32_nds32_set_target_option): Remove the unused parameters.
	(nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
	nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
	nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
	nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
	calculate_plt_offset, calculate_got_memory_address,
	nds32_elf_check_dup_relocs): Removed.
	All callers changed.
	* elf32-nds32.h: Remove the unused macros and defines.
	(elf_nds32_link_hash_table): Remove the unused variable.
	(bfd_elf32_nds32_set_target_option): Update prototype.
	(nds32_elf_ex9_init): Removed.
	* elf32-nds32.c (nds32_convert_32_to_16): Updated.
	* elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
	to initialize array nds32_elf_howto_table in any order
	without lots of EMPTY_HOWTO.
	(nds32_reloc_map): Updated.
	* reloc.c: Add BFD_RELOC_NDS32_LSI.
	* bfd-in2.h: Regenerated.
	* bfd/libbfd.h: Regenerated.
	* elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
	(nds32_reloc_map): Likewise.
	(nds32_elf_relax_flsi): New function.
	(nds32_elf_relax_section): Support floating load/store relaxation.
	* elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
	New macro.
	(struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
	(struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
	(elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
	nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
	New functions.
	(nds32_info_to_howto_rel): Add BFD_ASSERT.
	(bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
	nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
	nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
	bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
	(nds32_elf_final_sda_base): Improve it to find the better gp value.
	(insert_nds32_elf_blank): Must consider `len' when inserting blanks.
	* elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
	(struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
	* elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
	(create_got_section): Likewise.
	(allocate_dynrelocs, nds32_elf_size_dynamic_sections,
	nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
	(nds32_elf_check_relocs): Fix the issue that the shared library may
	has TEXTREL entry in the dynamic section.
	(nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
	since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
	(nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
	dynamic entry.
	(calculate_offset): Remove the unused parameter `pic_ext_target' and
	related codes.
	All callers changed.
	(elf_backend_dtrel_excludes_plt): Disable it temporarily since it
	will cause some errors for our test cases.
	* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
	generic object.
	* reloc.c: Add TLS relocations.
	* libbfd.h: Regenerated.
	* bfd-in2.h: Regenerated.
	* elf32-nds32.h (struct section_id_list_t): New.
	(elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
	elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
	New prototypes.
	(elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
	New macro.
	(nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
	elf_nds32_link_hash_table): Updated.
	* elf32-nds32.c (enum elf_nds32_tls_type): New.
	(struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
	(elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
	fls, ones32, list_insert, list_insert_sibling, dump_chain,
	elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
	elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
	(elf_nds32_obj_tdata): Add new fields.
	(elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
	(nds32_elf_howto_table): Add TLS relocations.
	(nds32_reloc_map): Likewise.
	(nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
	nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
	nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
	nds32_elf_check_relocs, allocate_dynrelocs): Updated.
	(nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
	(dtpoff_base): Rename it to `gottpof' and then update it.

opcodes	* nds32-asm.c (operand_fields): Remove the unused fields.
	(nds32_opcodes): Remove the unused instructions.
	* nds32-dis.c (nds32_ex9_info): Removed.
	(nds32_parse_opcode): Updated.
	(print_insn_nds32): Likewise.
	* nds32-asm.c (config.h, stdlib.h, string.h): New includes.
	(LEX_SET_FIELD, LEX_GET_FIELD): Update defines.
	(nds32_asm_init, build_operand_hash_table, build_keyword_hash_table,
	build_opcode_hash_table): New functions.
	(nds32_keyword_table, nds32_keyword_count_table, nds32_field_table,
	nds32_opcode_table): New.
	(hw_ktabs): Declare it to a pointer rather than an array.
	(build_hash_table): Removed.
	* nds32-asm.h (enum): Add SYN_INPUT, SYN_OUTPUT, SYN_LOPT,
	SYN_ROPT and upadte HW_GPR and HW_INT.
	* nds32-dis.c (keywords): Remove const.
	(match_field): New function.
	(nds32_parse_opcode): Updated.
	* disassemble.c (disassemble_init_for_target):
	Add disassemble_init_nds32.
	* nds32-dis.c (eum map_type): New.
	(nds32_private_data): Likewise.
	(get_mapping_symbol_type, is_mapping_symbol, nds32_symbol_is_valid,
	nds32_add_opcode_hash_table, disassemble_init_nds32): New functions.
	(print_insn_nds32): Updated.
	* nds32-asm.c (parse_aext_reg): Add new parameter.
	(parse_re, parse_re2, parse_aext_reg): Only reduced registers
	are allowed to use.
	All callers changed.
	* nds32-asm.c (keyword_usr, keyword_sr): Updated.
	(operand_fields): Add new fields.
	(nds32_opcodes): Add new instructions.
	(keyword_aridxi_mx): New keyword.
	* nds32-asm.h (enum): Add NASM_ATTR_DSP_ISAEXT, HW_AEXT_ARIDXI_MX
	and NASM_ATTR_ZOL.
	(ALU2_1, ALU2_2, ALU2_3): New macros.
	* nds32-dis.c (nds32_filter_unknown_insn): Updated.
2018-09-20 13:32:58 +01:00
Tamar Christina af81c43b51 Fix Aarch64 bug in warning filtering.
This fixes a small bug with the warning filtering code, which when a line has
generated a warning and a template decode error (due to the way templates are
resolved) which would not have been emitted and warnings are being suppressed
with -W it would erroneously emit the error.

I have no testcase for this because the only places we generate warnings during
encoding/decoding now is using msr/mrs and system registers.  They don't have a
template that would trigger this.

However an upcoming patch series will have tests in it which would expose this bug.

gas/ChangeLog:

	* config/tc-aarch64.c (output_operand_error_report): Apply filtering to
	current instead of head message.
2018-09-18 14:37:56 +01:00
Jim Wilson 4e2b18982a RISC-V: bge[u] should get higher priority than ble[u].
2018-09-17  Kito Cheng  <kito@andestech.com>
gas/
	* testsuite/gas/riscv/bge.d: New.
	* testsuite/gas/riscv/bge.s: Likewise.
opcodes/
	* riscv-opc.c (riscv_opcodes): Adjust the order of ble and
	  bleu.
2018-09-17 11:43:08 -07:00
H.J. Lu 04e2a1829e x86: Set EVex=2 on EVEX.128 only vmovd and vmovq
EVEX "VMOVD xmm1, r32/m32", "VMOVD r32/m32, xmm2", "VMOVQ xmm1, r64/m64",
"VMOVD r64/m64, xmm2", "VMOVQ xmm1, xmm2/m64" and "VMOVQ xmm1/m64, xmm2"
can only be encoded with EVEX.128.  Set EVex=2 on EVEX.128 only vmovd and
vmovq.

gas/

	PR gas/23670
	* testsuite/gas/i386/evex-lig-2.d: New file.
	* testsuite/gas/i386/evex-lig-2.s: Likewise.
	* testsuite/gas/i386/x86-64-evex-lig-2.d: Likewise.
	* testsuite/gas/i386/x86-64-evex-lig-2.s: Likewise.
	* testsuite/gas/i386/i386.exp: Run evex-lig-2 and
	x86-64-evex-lig-2.

opcodes/

	PR gas/23670
	* i386-dis-evex.h (evex_table): Use EVEX_LEN_0F6E_P_2,
	EVEX_LEN_0F7E_P_1, EVEX_LEN_0F7E_P_2 and EVEX_LEN_0FD6_P_2.
	(EVEX_LEN_0F6E_P_2): New EVEX_LEN_TABLE entry.
	(EVEX_LEN_0F7E_P_1): Likewise.
	(EVEX_LEN_0F7E_P_2): Likewise.
	(EVEX_LEN_0FD6_P_2): Likewise.
	* i386-dis.c (USE_EVEX_LEN_TABLE): New.
	(EVEX_LEN_TABLE): Likewise.
	(EVEX_LEN_0F6E_P_2): New enum.
	(EVEX_LEN_0F7E_P_1): Likewise.
	(EVEX_LEN_0F7E_P_2): Likewise.
	(EVEX_LEN_0FD6_P_2): Likewise.
	(evex_len_table): New.
	(get_valid_dis386): Handle USE_EVEX_LEN_TABLE.
	* i386-opc.tbl: Set EVex=2 on EVEX.128 only vmovd and vmovq.
	* i386-tbl.h: Regenerated.
2018-09-17 09:33:35 -07:00
H.J. Lu d5f787c2bc x86: Set Vex=1 on VEX.128 only vmovd and vmovq
AVX "VMOVD xmm1, r32/m32", "VMOVD r32/m32, xmm2", "VMOVQ xmm1, r64/m64"
and "VMOVD r64/m64, xmm2" can only be encoded with VEX.128.  Set Vex=1
on VEX.128 only vmovd and vmovq.

gas/

	PR gas/23665
	* testsuite/gas/i386/avx-scalar.s: Remove vmovq and vmovd tests.
	* testsuite/gas/i386/x86-64-avx-scalar.s: Likewise.
	* testsuite/gas/i386/avx-scalar-intel.d: Updated.
	* testsuite/gas/i386/avx-scalar.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar-intel.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar.d: Likewise.
	* testsuite/gas/i386/i386.exp: Run avx-scalar2 and
	x86-64-avx-scalar2.
	* testsuite/gas/i386/avx-scalar-2.d: New file.
	* testsuite/gas/i386/avx-scalar-2.s: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar-2.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar-2.s: Likewise.

opcodes/

	PR gas/23665
	* i386-dis.c (vex_len_table): Update VEX_LEN_0F6E_P_2 and
	VEX_LEN_0F7E_P_2 entries.
	* i386-opc.tbl: Set Vex=1 on VEX.128 only vmovd and vmovq.
	* i386-tbl.h: Regenerated.
2018-09-17 09:31:17 -07:00
H.J. Lu 0375113302 x86: Add -mvexwig=[0|1] option to assembler
Add -mvexwig=[0|1] option to x86 assembler to control how the assembler
should encode the VEX.W bit in WIG VEX instructions.

	* gas/NEWS: Mention -mvexwig=[0|1] option.
	* config/tc-i386.c (vexwig): New.
	(build_vex_prefix): Set the VEX.W bit for -mvexwig=1 for WIG
	VEX instructions.
	(OPTION_MVEXWIG): New.
	(md_longopts): Add -mvexwig=.
	(md_parse_option): Handle OPTION_MVEXWIG.
	(md_show_usage): Show -mvexwig=[0|1].
	* doc/c-i386.texi: Document -mvexwig=[0|1].
	* testsuite/gas/i386/avx-wig.d: New file.
	* testsuite/gas/i386/avx-wig.s: Likewise.
	* testsuite/gas/i386/avx2-wig.d: Likewise.
	* testsuite/gas/i386/avx2-wig.s: Likewise.
	* testsuite/gas/i386/x86-64-avx-wig.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-wig.s: Likewise.
	* testsuite/gas/i386/x86-64-avx2-wig.d: Likewise.
	* testsuite/gas/i386/x86-64-avx2-wig.s: Likewise.
	* testsuite/gas/i386/i386.exp: Run avx-wig, avx2-wig,
	x86-64-avx-wig and x86-64-avx2-wig.
2018-09-17 09:26:29 -07:00
Alan Modra a4b9568c7e Remove bogus notarget in gas teststuite
* testsuite/gas/arm/arch7.d: Delete notarget.
	* testsuite/gas/arm/arch7a-mp.d: Likewise.
	* testsuite/gas/arm/arch7em.d: Likewise.
	* testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise.
	* testsuite/gas/arm/barrier.d: Likewise.
	* testsuite/gas/arm/bignum1.d: Likewise.
	* testsuite/gas/arm/thumb32.d: Likewise.
	* testsuite/gas/elf/dwarf2-1.d: Likewise.
	* testsuite/gas/elf/dwarf2-2.d: Likewise.
	* testsuite/gas/elf/dwarf2-4.d: Likewise.
	* testsuite/gas/elf/group2.d: Likewise.
	* testsuite/gas/arm/mapshort-elf.d: Only notarget pe and wince.
	* testsuite/gas/elf/dwarf2-3.d: Delete notarget, xfail ft32 and h8300.
	* testsuite/gas/elf/dwarf2-6.d: Delete notarget, xfail a few.
2018-09-17 23:22:30 +09:30
Alan Modra 0b1352e04c A few hppa testcase tidies
binutils/
	* testsuite/lib/binutils-common.exp (is_som_format): New proc.
	(run_dump_test): Correct target test for alternate .comm syntax.
	(get_standard_section_names): Handle som format.
	* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
	Correct target test for alternate .comm syntax.
gas/
	* testsuite/gas/all/gas.exp (redef3): Don't xfail for hppa.
	(octa): Run for hppa.
	* testsuite/gas/elf/elf.exp (common1, common2): Likewise.
	* testsuite/gas/elf/symver.d: Delete notarget.
ld/
	* testsuite/ld-elf/comm-data5.d: Remove notarget for hppa.
	* testsuite/ld-scripts/defined6.d: Likewise.
2018-09-17 23:17:14 +09:30
Nick Clifton a0a8a9340d Ensure that binutils test names are unique.
binutils* testsuite/binutils-all/compress.exp: Rename second "objcopy
	zlib-gnu compress debug sections 3" test to "objcopy zlib-gabi
	compress debug sections 3" and use gabi object files instead
	of gnu object files.
	* testsuite/binutils-all/objcopy.exp: Add suffix to the names
	of the "ELF group" tests.
	* testsuite/binutils-all/readelf.exp (proc readelf_find_size):
	Add an iteration parameter and include it in the name of the
	test.  Update callers to include an iteration count.

gas	* testuite/gas/elf/group0a.d: Add extra details to the test
	name.
	* testuite/gas/elf/group0b.d: Likewise.
	* testuite/gas/elf/group1a.d: Likewise.
	* testuite/gas/elf/group1b.d: Likewise.
	* testuite/gas/elf/group0b.d: Likewise.
	* testuite/gas/elf/section9.d: Likewise.
	* testuite/gas/i386/ilp32/lns/lns-common-1.d: Likewise.
	* testuite/gas/i386/ilp32/lns/lns-duplicate-1.d: Likewise.

ld	* testuite/ld/ld-elf/audit.exp: Differentiate the names of the
	two "Run with shared with --audit" tests.
	* testuite/ld/ld-elf/compress.exp: Differentiate the zlib
	compressed debug output test names.
	* testuite/ld/ld-i386/tlspie1.d: Add extra details to the test
	name.
	* testuite/ld/ld-i386/tlspie2.d: Likewise.
	* testuite/ld/ld-size/size.exp: Add missing escapes to the end
	of lines in the size-3e test.
	* testuite/ld/ld-unique/unique.exp: Differentiate the names of
	the two "Checking unique PIC object" tests.
	* testuite/ld/ld-x86-64/tlspie1.d: Add extra details to the test
	name.
2018-09-17 10:10:47 +01:00
H.J. Lu 3c3741435f x86: Set Vex=1 on VEX.128 only vmovq
AVX "VMOVQ xmm1, xmm2/m64" and "VMOVQ xmm1/m64, xmm2" can only be
encoded with VEX.128.  Set Vex=1 on VEX.128 only vmovq and update
assembler tests.

gas/

	PR gas/23665
	* testsuite/gas/i386/avx-scalar-intel.d: Updated.
	* testsuite/gas/i386/avx-scalar.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar-intel.d: Likewise.
	* testsuite/gas/i386/x86-64-avx-scalar.d: Likewise.

opcodes/

	PR gas/23665
	* i386-dis.c (vex_len_table): Update VEX_LEN_0F7E_P_1 and
	VEX_LEN_0FD6_P_2 entries.
	* i386-opc.tbl: Set Vex=1 on VEX.128 only vmovq.
	* i386-tbl.h: Regenerated.
2018-09-15 14:50:40 -07:00
Alan Modra 8ffb70eb57 Consolidate run_dump_test
This merges the three versions of run_dump_test.  Improved warning
handling versus the old gas version shows up a number of tests that
need their disassembly updating:
arm-linuxeabi  +FAIL: ARM v1 instructions
arm-linuxeabi  +FAIL: Accepted v8-a with ARMv8.1 AdvSIMD.
arm-linuxeabi  +FAIL: bl local instructions for v4t.
arm-linuxeabi  +FAIL: UDF
and some that now fail due to detecting assembly warnings:
h8300-elf  +FAIL: binutils-all/strip-13
h8300-elf  +FAIL: binutils-all/strip-14
h8300-elf  +FAIL: binutils-all/strip-15

I've generally kept the union of all run_dump_test features, except
that the ld target aliases "cfi" and "shared" have disappeared, as has
the binutils substitution of $srcdir as $scrdir/$subdir.

binutils/
	* testsuite/binutils-all/add-symbol.d: Add "section_subst: no".
	* testsuite/binutils-all/elfedit.exp: Don't set tempfile or copyfile.
	* testsuite/binutils-all/symbols-1.d,
	* testsuite/binutils-all/symbols-2.d,
	* testsuite/binutils-all/symbols-3.d,
	* testsuite/binutils-all/symbols-4.d: Quote '*' and '!'.
	* testsuite/binutils-all/add-empty-section.d,
	* testsuite/binutils-all/add-section.d,
	* testsuite/binutils-all/elfedit.exp,
	* testsuite/binutils-all/note-1.d,
	* testsuite/binutils-all/pr23633.d: Add $subdir after $srcdir.
	* testsuite/config/default.exp (AS, ASFLAGS): Define.
	* testsuite/config/hppa.sed: Handle all common symbols.
	* testsuite/lib/binutils-common.exp (run_dump_test): New proc,
	merged from three other versions.
	(slurp_options, file_contents, set_file_contents): Likewise.
	(big_or_little_endian, get_standard_section_names): Likewise.
	* testsuite/lib/utils-lib.exp (run_dump_test): Delete.
	(slurp_options, proc file_contents): Delete.
	(get_standard_section_names): Delete.
gas/
	* testsuite/config/default.exp: Make tmpdir.
	* testsuite/lib/gas-defs.exp (run_dump_test): Delete.
	(get_standard_section_names, slurp_options): Delete.
ld/
	* testsuite/ld-d10v/reloc-007.d,
	* testsuite/ld-d10v/reloc-008.d,
	* testsuite/ld-d10v/reloc-015.d,
	* testsuite/ld-d10v/reloc-016.d: Remove "error:".
	* testsuite/ld-elf/eh-frame-hdr.d,
	* testsuite/ld-elf/eh5.d,
	* testsuite/ld-gc/personality.d: Replace "cfi" and "shared" in
	target list with appropriate proc.
	* testsuite/ld-elf/frame.exp: Use check_shared_lib_support rather
	than "istarget shared".
	* testsuite/lib/ld-lib.exp (proc big_or_little_endian): Delete.
	(run_dump_test, slurp_options, file_contents): Delete.
	(set_file_contents, istarget): Delete.
2018-09-15 16:56:55 +09:30
Alan Modra 99bcaeaf0f run_dump_test replace PROG with DUMPPROG in gas and ld
To be compatible with the binutils version, that uses PROG for the
tool under test and DUMPPROG for the dump tool.

gas/
	* testsuite/gas/mips/aent-2.d,
	* testsuite/gas/mips/aent-mdebug-2.d,
	* testsuite/gas/mips/attr-gnu-4-0.d,
	* testsuite/gas/mips/attr-gnu-4-1.d,
	* testsuite/gas/mips/attr-gnu-4-2.d,
	* testsuite/gas/mips/attr-gnu-4-3.d,
	* testsuite/gas/mips/attr-gnu-4-5.d,
	* testsuite/gas/mips/attr-gnu-4-6.d,
	* testsuite/gas/mips/attr-gnu-4-7.d,
	* testsuite/gas/mips/attr-none-double.d,
	* testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d,
	* testsuite/gas/mips/attr-none-o32-fp64.d,
	* testsuite/gas/mips/attr-none-o32-fpxx.d,
	* testsuite/gas/mips/attr-none-single-float.d,
	* testsuite/gas/mips/attr-none-soft-float.d,
	* testsuite/gas/mips/elf-rel27.d,
	* testsuite/gas/mips/loc-swap-2.d,
	* testsuite/gas/mips/loc-swap-3.d,
	* testsuite/gas/mips/loc-swap.d,
	* testsuite/gas/mips/micromips@loc-swap-2.d,
	* testsuite/gas/mips/micromips@loc-swap.d,
	* testsuite/gas/mips/micromips@stabs-symbol-type.d,
	* testsuite/gas/mips/mips16-intermix.d,
	* testsuite/gas/mips/mips16@loc-swap-2.d,
	* testsuite/gas/mips/mips16@loc-swap.d,
	* testsuite/gas/mips/mips16@stabs-symbol-type.d,
	* testsuite/gas/mips/mips16e@loc-swap.d,
	* testsuite/gas/mips/no-odd-spreg.d,
	* testsuite/gas/mips/odd-spreg.d,
	* testsuite/gas/mips/r6-attr-none-double.d,
	* testsuite/gas/mips/stabs-symbol-type.d,
	* testsuite/lib/gas-defs.exp (run_dump_test): Replace PROG
	with DUMPPROG.
ld/
	* testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG
	with DUMPPROG.
2018-09-15 16:24:18 +09:30
Alan Modra 4abd8e8de7 gas testuite fixes: don't match dump.o
The consolidated run_dump_test will use object file names based on the
source file name, like the current ld version.

	* testsuite/gas/elf/symver.d,
	* testsuite/gas/ft32/insn.d,
	* testsuite/gas/ft32/insnsc.d,
	* testsuite/gas/i386/ilp32/elf/symver.d,
	* testsuite/gas/lm32/csr.d,
	* testsuite/gas/lm32/insn.d,
	* testsuite/gas/m68hc11/9s12x-exg-sex-tfr.d,
	* testsuite/gas/m68hc11/9s12x-mov.d,
	* testsuite/gas/m68hc11/hexprefix.d,
	* testsuite/gas/m68hc11/insns9s12x.d,
	* testsuite/gas/m68hc11/insns9s12xg.d,
	* testsuite/gas/mep/dj1.be.d,
	* testsuite/gas/mep/dj1.le.d,
	* testsuite/gas/mips/set-arch.d,
	* testsuite/gas/mips/tls-o32.d,
	* testsuite/gas/nios2/branch-r2.d,
	* testsuite/gas/nios2/branch.d,
	* testsuite/gas/pdp11/absreloc.d,
	* testsuite/gas/pdp11/opcode.d,
	* testsuite/gas/pdp11/pr14480.d,
	* testsuite/gas/pdp11/pr23481.d,
	* testsuite/gas/ppc/xcoff-dwsect-1-32.d,
	* testsuite/gas/ppc/xcoff-dwsect-1-64.d,
	* testsuite/gas/rx/abs.d,
	* testsuite/gas/rx/adc.d,
	* testsuite/gas/rx/add.d,
	* testsuite/gas/rx/and.d,
	* testsuite/gas/rx/bclr.d,
	* testsuite/gas/rx/bcnd.d,
	* testsuite/gas/rx/bmcnd.d,
	* testsuite/gas/rx/bnot.d,
	* testsuite/gas/rx/bra.d,
	* testsuite/gas/rx/brk.d,
	* testsuite/gas/rx/bset.d,
	* testsuite/gas/rx/bsr.d,
	* testsuite/gas/rx/btst.d,
	* testsuite/gas/rx/clrpsw.d,
	* testsuite/gas/rx/cmp.d,
	* testsuite/gas/rx/dbt.d,
	* testsuite/gas/rx/div.d,
	* testsuite/gas/rx/divu.d,
	* testsuite/gas/rx/emaca.d,
	* testsuite/gas/rx/emsba.d,
	* testsuite/gas/rx/emul.d,
	* testsuite/gas/rx/emula.d,
	* testsuite/gas/rx/emulu.d,
	* testsuite/gas/rx/fadd.d,
	* testsuite/gas/rx/fcmp.d,
	* testsuite/gas/rx/fdiv.d,
	* testsuite/gas/rx/fmul.d,
	* testsuite/gas/rx/fsqrt.d,
	* testsuite/gas/rx/fsub.d,
	* testsuite/gas/rx/ftoi.d,
	* testsuite/gas/rx/ftou.d,
	* testsuite/gas/rx/gprel.d,
	* testsuite/gas/rx/int.d,
	* testsuite/gas/rx/itof.d,
	* testsuite/gas/rx/jmp.d,
	* testsuite/gas/rx/jsr.d,
	* testsuite/gas/rx/machi.d,
	* testsuite/gas/rx/maclh.d,
	* testsuite/gas/rx/maclo.d,
	* testsuite/gas/rx/max.d,
	* testsuite/gas/rx/min.d,
	* testsuite/gas/rx/mov.d,
	* testsuite/gas/rx/movco.d,
	* testsuite/gas/rx/movli.d,
	* testsuite/gas/rx/movu.d,
	* testsuite/gas/rx/msbhi.d,
	* testsuite/gas/rx/msblh.d,
	* testsuite/gas/rx/msblo.d,
	* testsuite/gas/rx/mul.d,
	* testsuite/gas/rx/mulhi.d,
	* testsuite/gas/rx/mullh.d,
	* testsuite/gas/rx/mullo.d,
	* testsuite/gas/rx/mvfacgu.d,
	* testsuite/gas/rx/mvfachi.d,
	* testsuite/gas/rx/mvfaclo.d,
	* testsuite/gas/rx/mvfacmi.d,
	* testsuite/gas/rx/mvfc.d,
	* testsuite/gas/rx/mvfcp.d,
	* testsuite/gas/rx/mvtacgu.d,
	* testsuite/gas/rx/mvtachi.d,
	* testsuite/gas/rx/mvtaclo.d,
	* testsuite/gas/rx/mvtc.d,
	* testsuite/gas/rx/mvtcp.d,
	* testsuite/gas/rx/neg.d,
	* testsuite/gas/rx/nop.d,
	* testsuite/gas/rx/not.d,
	* testsuite/gas/rx/opecp.d,
	* testsuite/gas/rx/or.d,
	* testsuite/gas/rx/pop.d,
	* testsuite/gas/rx/popc.d,
	* testsuite/gas/rx/popm.d,
	* testsuite/gas/rx/pr19665.d,
	* testsuite/gas/rx/pr22737.d,
	* testsuite/gas/rx/push.d,
	* testsuite/gas/rx/pushc.d,
	* testsuite/gas/rx/pushm.d,
	* testsuite/gas/rx/r-bcc.d,
	* testsuite/gas/rx/r-bra.d,
	* testsuite/gas/rx/racl.d,
	* testsuite/gas/rx/racw.d,
	* testsuite/gas/rx/rdacl.d,
	* testsuite/gas/rx/rdacw.d,
	* testsuite/gas/rx/revl.d,
	* testsuite/gas/rx/revw.d,
	* testsuite/gas/rx/rmpa.d,
	* testsuite/gas/rx/rolc.d,
	* testsuite/gas/rx/rorc.d,
	* testsuite/gas/rx/rotl.d,
	* testsuite/gas/rx/rotr.d,
	* testsuite/gas/rx/round.d,
	* testsuite/gas/rx/rte.d,
	* testsuite/gas/rx/rtfi.d,
	* testsuite/gas/rx/rts.d,
	* testsuite/gas/rx/rtsd.d,
	* testsuite/gas/rx/sat.d,
	* testsuite/gas/rx/satr.d,
	* testsuite/gas/rx/sbb.d,
	* testsuite/gas/rx/sccnd.d,
	* testsuite/gas/rx/scmpu.d,
	* testsuite/gas/rx/setpsw.d,
	* testsuite/gas/rx/shar.d,
	* testsuite/gas/rx/shll.d,
	* testsuite/gas/rx/shlr.d,
	* testsuite/gas/rx/smovb.d,
	* testsuite/gas/rx/smovf.d,
	* testsuite/gas/rx/smovu.d,
	* testsuite/gas/rx/sstr.d,
	* testsuite/gas/rx/stnz.d,
	* testsuite/gas/rx/stz.d,
	* testsuite/gas/rx/sub.d,
	* testsuite/gas/rx/suntil.d,
	* testsuite/gas/rx/swhile.d,
	* testsuite/gas/rx/tst.d,
	* testsuite/gas/rx/utof.d,
	* testsuite/gas/rx/wait.d,
	* testsuite/gas/rx/xchg.d,
	* testsuite/gas/rx/xor.d,
	* testsuite/gas/s12z/abs.d,
	* testsuite/gas/s12z/adc-imm.d,
	* testsuite/gas/s12z/adc-opr.d,
	* testsuite/gas/s12z/add-imm.d,
	* testsuite/gas/s12z/add-opr.d,
	* testsuite/gas/s12z/and-imm.d,
	* testsuite/gas/s12z/and-opr.d,
	* testsuite/gas/s12z/and-or-cc.d,
	* testsuite/gas/s12z/bfext-special.d,
	* testsuite/gas/s12z/bfext.d,
	* testsuite/gas/s12z/bit-manip.d,
	* testsuite/gas/s12z/bit.d,
	* testsuite/gas/s12z/bra-expression-defined.d,
	* testsuite/gas/s12z/bra-expression-undef.d,
	* testsuite/gas/s12z/bra.d,
	* testsuite/gas/s12z/brclr-symbols.d,
	* testsuite/gas/s12z/brset-clr-opr-imm-rel.d,
	* testsuite/gas/s12z/brset-clr-opr-reg-rel.d,
	* testsuite/gas/s12z/brset-clr-reg-imm-rel.d,
	* testsuite/gas/s12z/brset-clr-reg-reg-rel.d,
	* testsuite/gas/s12z/clb.d,
	* testsuite/gas/s12z/clr-opr.d,
	* testsuite/gas/s12z/clr.d,
	* testsuite/gas/s12z/cmp-imm.d,
	* testsuite/gas/s12z/cmp-opr-inc.d,
	* testsuite/gas/s12z/cmp-opr-rdirect.d,
	* testsuite/gas/s12z/cmp-opr-reg.d,
	* testsuite/gas/s12z/cmp-opr-rindirect.d,
	* testsuite/gas/s12z/cmp-opr-sxe4.d,
	* testsuite/gas/s12z/cmp-opr-xys.d,
	* testsuite/gas/s12z/cmp-s-imm.d,
	* testsuite/gas/s12z/cmp-s-opr.d,
	* testsuite/gas/s12z/cmp-xy.d,
	* testsuite/gas/s12z/com-opr.d,
	* testsuite/gas/s12z/complex-shifts.d,
	* testsuite/gas/s12z/db-tb-cc-opr.d,
	* testsuite/gas/s12z/db-tb-cc-reg.d,
	* testsuite/gas/s12z/dbCC.d,
	* testsuite/gas/s12z/dec-opr.d,
	* testsuite/gas/s12z/dec.d,
	* testsuite/gas/s12z/div.d,
	* testsuite/gas/s12z/eor.d,
	* testsuite/gas/s12z/exg.d,
	* testsuite/gas/s12z/ext24-ld-xy.d,
	* testsuite/gas/s12z/inc-opr.d,
	* testsuite/gas/s12z/inc.d,
	* testsuite/gas/s12z/inh.d,
	* testsuite/gas/s12z/jmp.d,
	* testsuite/gas/s12z/jsr.d,
	* testsuite/gas/s12z/ld-imm-page2.d,
	* testsuite/gas/s12z/ld-imm.d,
	* testsuite/gas/s12z/ld-immu18.d,
	* testsuite/gas/s12z/ld-large-direct.d,
	* testsuite/gas/s12z/ld-opr.d,
	* testsuite/gas/s12z/ld-s-opr.d,
	* testsuite/gas/s12z/ld-small-direct.d,
	* testsuite/gas/s12z/lea-immu18.d,
	* testsuite/gas/s12z/lea.d,
	* testsuite/gas/s12z/mac.d,
	* testsuite/gas/s12z/min-max.d,
	* testsuite/gas/s12z/mod.d,
	* testsuite/gas/s12z/mov.d,
	* testsuite/gas/s12z/mul-imm.d,
	* testsuite/gas/s12z/mul-opr-opr.d,
	* testsuite/gas/s12z/mul-opr.d,
	* testsuite/gas/s12z/mul-reg.d,
	* testsuite/gas/s12z/mul.d,
	* testsuite/gas/s12z/neg-opr.d,
	* testsuite/gas/s12z/not-so-simple-shifts.d,
	* testsuite/gas/s12z/opr-18u.d,
	* testsuite/gas/s12z/opr-expr.d,
	* testsuite/gas/s12z/opr-ext-18.d,
	* testsuite/gas/s12z/opr-idx-24-reg.d,
	* testsuite/gas/s12z/opr-idx3-reg.d,
	* testsuite/gas/s12z/opr-idx3-xysp-24.d,
	* testsuite/gas/s12z/opr-indirect-expr.d,
	* testsuite/gas/s12z/opr-symbol.d,
	* testsuite/gas/s12z/or-imm.d,
	* testsuite/gas/s12z/or-opr.d,
	* testsuite/gas/s12z/p2-mul.d,
	* testsuite/gas/s12z/page2-inh.d,
	* testsuite/gas/s12z/psh-pul.d,
	* testsuite/gas/s12z/qmul.d,
	* testsuite/gas/s12z/rotate.d,
	* testsuite/gas/s12z/sat.d,
	* testsuite/gas/s12z/sbc-imm.d,
	* testsuite/gas/s12z/sbc-opr.d,
	* testsuite/gas/s12z/shift.d,
	* testsuite/gas/s12z/simple-shift.d,
	* testsuite/gas/s12z/single-ops.d,
	* testsuite/gas/s12z/specd6.d,
	* testsuite/gas/s12z/st-large-direct.d,
	* testsuite/gas/s12z/st-opr.d,
	* testsuite/gas/s12z/st-s-opr.d,
	* testsuite/gas/s12z/st-small-direct.d,
	* testsuite/gas/s12z/st-xy.d,
	* testsuite/gas/s12z/sub-imm.d,
	* testsuite/gas/s12z/sub-opr.d,
	* testsuite/gas/s12z/tfr.d,
	* testsuite/gas/s12z/trap.d,
	* testsuite/gas/sh/fdpic.d,
	* testsuite/gas/sh/sh2a-pic.d,
	* testsuite/gas/sh/sh2a.d: Don't match object file name.
	* testsuite/gas/wasm32/disass-2.d,
	* testsuite/gas/wasm32/disass.d: Likewise, and tidy regexps.
2018-09-15 16:24:18 +09:30
Alan Modra e643ed088a gas run_dump_test rename stderr and error-output
Use warning_output and error_output, like the ld version of
run_dump_test.  Note that some tests used the wrong option, and this
went undetected since the gas version of run_dump_test doesn't
properly check tool error status.  This patch corrects wrong options,
in preparation for a later patch that will check error status.

	* testsuite/gas/aarch64/armv8_2-a-crypto-fp16-illegal.d,
	* testsuite/gas/aarch64/armv8_2-a-illegal.d,
	* testsuite/gas/aarch64/armv8_4-a-illegal.d,
	* testsuite/gas/aarch64/armv8_4-a-registers-illegal.d,
	* testsuite/gas/aarch64/deprecated.d,
	* testsuite/gas/aarch64/diagnostic.d,
	* testsuite/gas/aarch64/illegal-2.d,
	* testsuite/gas/aarch64/illegal-by-element.d,
	* testsuite/gas/aarch64/illegal-crypto-nofp.d,
	* testsuite/gas/aarch64/illegal-fcmla.d,
	* testsuite/gas/aarch64/illegal-fjcvtzs.d,
	* testsuite/gas/aarch64/illegal-fp16-nofp.d,
	* testsuite/gas/aarch64/illegal-ldapr.d,
	* testsuite/gas/aarch64/illegal-ldraa.d,
	* testsuite/gas/aarch64/illegal-lse.d,
	* testsuite/gas/aarch64/illegal-nofp-armv8_3.d,
	* testsuite/gas/aarch64/illegal-nofp16.d,
	* testsuite/gas/aarch64/illegal-ras-1.d,
	* testsuite/gas/aarch64/illegal-sysreg-2.d,
	* testsuite/gas/aarch64/illegal-sysreg-3.d,
	* testsuite/gas/aarch64/illegal.d,
	* testsuite/gas/aarch64/legacy_reg_names.d,
	* testsuite/gas/aarch64/pan-illegal.d,
	* testsuite/gas/aarch64/pr22529.d,
	* testsuite/gas/aarch64/rm-simd-ext.d,
	* testsuite/gas/aarch64/sve-invalid.d,
	* testsuite/gas/aarch64/sve-reg-diagnostic.d,
	* testsuite/gas/aarch64/sve-sysreg-invalid.d,
	* testsuite/gas/aarch64/sysreg-diagnostic.d,
	* testsuite/gas/aarch64/verbose-error.d,
	* testsuite/gas/all/byte.d,
	* testsuite/gas/all/org-1.d,
	* testsuite/gas/all/org-2.d,
	* testsuite/gas/all/org-3.d,
	* testsuite/gas/all/sleb128-9.d,
	* testsuite/gas/arc/asm-errors-2.d,
	* testsuite/gas/arc/asm-errors-3.d,
	* testsuite/gas/arc/asm-errors.d,
	* testsuite/gas/arc/attr-rf16.d,
	* testsuite/gas/arc/relocs-errors.d,
	* testsuite/gas/arc/textinsn-errors.d,
	* testsuite/gas/arm/addsw-bad.d,
	* testsuite/gas/arm/addthumb2err.d,
	* testsuite/gas/arm/adr-invalid.d,
	* testsuite/gas/arm/arch7em-bad-1.d,
	* testsuite/gas/arm/arch7em-bad-2.d,
	* testsuite/gas/arm/arch7em-bad-3.d,
	* testsuite/gas/arm/arch7m-bad.d,
	* testsuite/gas/arm/archv6s-m-bad.d,
	* testsuite/gas/arm/archv6t2-bad.d,
	* testsuite/gas/arm/arm-idiv-bad.d,
	* testsuite/gas/arm/arm-it-bad-2.d,
	* testsuite/gas/arm/arm-it-bad-3.d,
	* testsuite/gas/arm/arm-it-bad.d,
	* testsuite/gas/arm/arm3-bad.d,
	* testsuite/gas/arm/arm7-bad.d,
	* testsuite/gas/arm/armv1-bad.d,
	* testsuite/gas/arm/armv1.d,
	* testsuite/gas/arm/armv2-mp-bad.d,
	* testsuite/gas/arm/armv8-2-fp16-scalar-bad.d,
	* testsuite/gas/arm/armv8-2-fp16-simd-warning-thumb.d,
	* testsuite/gas/arm/armv8-2-fp16-simd-warning.d,
	* testsuite/gas/arm/armv8-a+rdma-warning.d,
	* testsuite/gas/arm/armv8-a-bad.d,
	* testsuite/gas/arm/armv8-a-it-bad.d,
	* testsuite/gas/arm/armv8-r-bad.d,
	* testsuite/gas/arm/armv8-r-it-bad.d,
	* testsuite/gas/arm/armv8_2-a-fp16-illegal.d,
	* testsuite/gas/arm/armv8_3-a-fp-bad.d,
	* testsuite/gas/arm/armv8_3-a-simd-bad.d,
	* testsuite/gas/arm/barrier-bad-thumb.d,
	* testsuite/gas/arm/barrier-bad.d,
	* testsuite/gas/arm/bl-local-v4t.d,
	* testsuite/gas/arm/blx-bl-convert.d,
	* testsuite/gas/arm/blx-local.d,
	* testsuite/gas/arm/branch-reloc.d,
	* testsuite/gas/arm/copro-arm_v2plus-arm_v1.d,
	* testsuite/gas/arm/copro-arm_v5plus-arm_v4.d,
	* testsuite/gas/arm/copro-arm_v5teplus-arm_v5.d,
	* testsuite/gas/arm/copro-arm_v6plus-arm_v5te.d,
	* testsuite/gas/arm/copro-thumb_v6t2plus-thumb_v4t-1.d,
	* testsuite/gas/arm/copro-thumb_v6t2plus-thumb_v4t-2.d,
	* testsuite/gas/arm/copro-thumb_v6t2plus-thumb_v4t-3.d,
	* testsuite/gas/arm/copro-thumb_v6t2plus-thumb_v4t-4.d,
	* testsuite/gas/arm/crc32-armv8-a-bad.d,
	* testsuite/gas/arm/crc32-armv8-r-bad.d,
	* testsuite/gas/arm/depr-swp.d,
	* testsuite/gas/arm/dest-unpredictable.d,
	* testsuite/gas/arm/dotprod-illegal.d,
	* testsuite/gas/arm/dotprod-legacy-arch.d,
	* testsuite/gas/arm/forbid-armv7-idiv-ext.d,
	* testsuite/gas/arm/group-reloc-alu-encoding-bad.d,
	* testsuite/gas/arm/group-reloc-alu-parsing-bad.d,
	* testsuite/gas/arm/group-reloc-ldc-encoding-bad.d,
	* testsuite/gas/arm/group-reloc-ldc-parsing-bad.d,
	* testsuite/gas/arm/group-reloc-ldr-encoding-bad.d,
	* testsuite/gas/arm/group-reloc-ldr-parsing-bad.d,
	* testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d,
	* testsuite/gas/arm/group-reloc-ldrs-parsing-bad.d,
	* testsuite/gas/arm/insn-error-a.d,
	* testsuite/gas/arm/insn-error-t.d,
	* testsuite/gas/arm/inst-po-2.d,
	* testsuite/gas/arm/iwmmxt-bad.d,
	* testsuite/gas/arm/iwmmxt-bad2.d,
	* testsuite/gas/arm/ld-sp-warn-cortex-m3.d,
	* testsuite/gas/arm/ld-sp-warn-cortex-m4.d,
	* testsuite/gas/arm/ld-sp-warn-v7.d,
	* testsuite/gas/arm/ld-sp-warn-v7a.d,
	* testsuite/gas/arm/ld-sp-warn-v7em.d,
	* testsuite/gas/arm/ld-sp-warn-v7m.d,
	* testsuite/gas/arm/ld-sp-warn-v7r.d,
	* testsuite/gas/arm/ld-sp-warn.d,
	* testsuite/gas/arm/ldgesb-bad.d,
	* testsuite/gas/arm/ldgesh-bad.d,
	* testsuite/gas/arm/ldr-bad.d,
	* testsuite/gas/arm/ldr-t-bad.d,
	* testsuite/gas/arm/ldrd-unpredictable.d,
	* testsuite/gas/arm/ldsgeb.d,
	* testsuite/gas/arm/ldsgeh.d,
	* testsuite/gas/arm/missing.d,
	* testsuite/gas/arm/mrs-msr-arm-v7-a-bad.d,
	* testsuite/gas/arm/mrs-msr-thumb-v7-m-bad.d,
	* testsuite/gas/arm/msr-imm-bad.d,
	* testsuite/gas/arm/msr-reg-bad.d,
	* testsuite/gas/arm/mul-overlap.d,
	* testsuite/gas/arm/neon-addressing-bad.d,
	* testsuite/gas/arm/neon-cond-bad.d,
	* testsuite/gas/arm/neon-ldst-align-bad.d,
	* testsuite/gas/arm/neon-ldst-es-bad.d,
	* testsuite/gas/arm/neon-suffix-bad.d,
	* testsuite/gas/arm/neon-vmov-bad.d,
	* testsuite/gas/arm/noarm.d,
	* testsuite/gas/arm/pr18256.d,
	* testsuite/gas/arm/pr18347.d,
	* testsuite/gas/arm/pr20429.d,
	* testsuite/gas/arm/pr22773.d,
	* testsuite/gas/arm/r15-bad.d,
	* testsuite/gas/arm/reloc-bad.d,
	* testsuite/gas/arm/req.d,
	* testsuite/gas/arm/shift-bad-pc.d,
	* testsuite/gas/arm/shift-bad.d,
	* testsuite/gas/arm/simd_by_scalar_low_regbank.d,
	* testsuite/gas/arm/simd_by_scalar_low_regbank_thumb.d,
	* testsuite/gas/arm/sp-pc-validations-bad-t-v8a.d,
	* testsuite/gas/arm/sp-pc-validations-bad-t.d,
	* testsuite/gas/arm/sp-pc-validations-bad.d,
	* testsuite/gas/arm/sp-usage-thumb2-relax-on-v7.d,
	* testsuite/gas/arm/srs-arm.d,
	* testsuite/gas/arm/srs-t2.d,
	* testsuite/gas/arm/strex-bad-t.d,
	* testsuite/gas/arm/t16-bad.d,
	* testsuite/gas/arm/thumb-b-bad.d,
	* testsuite/gas/arm/thumb-w-bad.d,
	* testsuite/gas/arm/thumb2_bad_reg.d,
	* testsuite/gas/arm/thumb2_it_bad.d,
	* testsuite/gas/arm/thumb2_it_bad_auto.d,
	* testsuite/gas/arm/thumb2_ldmstm_bad.d,
	* testsuite/gas/arm/thumb2_ldstd_unpredictable.d,
	* testsuite/gas/arm/thumb2_mul-bad.d,
	* testsuite/gas/arm/thumb2_str-bad.d,
	* testsuite/gas/arm/thumb32.d,
	* testsuite/gas/arm/udf-bad.d,
	* testsuite/gas/arm/udf.d,
	* testsuite/gas/arm/undefined.d,
	* testsuite/gas/arm/undefined_coff.d,
	* testsuite/gas/arm/vcmp-zero-bad.d,
	* testsuite/gas/arm/vcvt-bad.d,
	* testsuite/gas/arm/vfp-bad.d,
	* testsuite/gas/arm/vfp-bad_t2.d,
	* testsuite/gas/arm/vfpv3-d16-bad.d,
	* testsuite/gas/arm/vldm-thumb-bad.d,
	* testsuite/gas/arm/vldmw-arm-bad.d,
	* testsuite/gas/arm/vldmw-thumb-bad.d,
	* testsuite/gas/arm/vstr-arm-bad.d,
	* testsuite/gas/arm/vstr-thumb-bad.d,
	* testsuite/gas/arm/weakdef-2.d,
	* testsuite/gas/avr/pr21621.d,
	* testsuite/gas/elf/bad-bss.d,
	* testsuite/gas/elf/bad-group.d,
	* testsuite/gas/elf/bad-group.err,
	* testsuite/gas/elf/bad-section-flag.d,
	* testsuite/gas/elf/bad-section-flag.err,
	* testsuite/gas/elf/bad-size.d,
	* testsuite/gas/elf/bad-size.err,
	* testsuite/gas/elf/common1.d,
	* testsuite/gas/elf/common2.d,
	* testsuite/gas/elf/common5a.d,
	* testsuite/gas/elf/common5b.d,
	* testsuite/gas/elf/common5c.d,
	* testsuite/gas/elf/common5d.d,
	* testsuite/gas/elf/dwarf2-10.d,
	* testsuite/gas/elf/dwarf2-8.d,
	* testsuite/gas/elf/dwarf2-9.d,
	* testsuite/gas/elf/pr21661.d,
	* testsuite/gas/elf/pseudo.d,
	* testsuite/gas/elf/section13.d,
	* testsuite/gas/i386/bad-size.d,
	* testsuite/gas/i386/bundle-bad.d,
	* testsuite/gas/i386/ilp32/x86-64-sse-check-warn.d,
	* testsuite/gas/i386/intel-intel.d,
	* testsuite/gas/i386/intel.d,
	* testsuite/gas/i386/intelok.d,
	* testsuite/gas/i386/mpx-add-bnd-prefix.d,
	* testsuite/gas/i386/sse-check-warn.d,
	* testsuite/gas/i386/string-ok.d,
	* testsuite/gas/i386/vgather-check-warn.d,
	* testsuite/gas/i386/x86-64-mpx-add-bnd-prefix.d,
	* testsuite/gas/i386/x86-64-sse-check-warn.d,
	* testsuite/gas/i386/x86-64-vgather-check-warn.d,
	* testsuite/gas/mips/addiu-error.d,
	* testsuite/gas/mips/branch-extern-3.d,
	* testsuite/gas/mips/branch-extern-4.d,
	* testsuite/gas/mips/branch-local-2.d,
	* testsuite/gas/mips/branch-local-3.d,
	* testsuite/gas/mips/branch-local-5.d,
	* testsuite/gas/mips/branch-local-6.d,
	* testsuite/gas/mips/branch-local-n32-2.d,
	* testsuite/gas/mips/branch-local-n32-3.d,
	* testsuite/gas/mips/branch-local-n32-5.d,
	* testsuite/gas/mips/branch-local-n32-6.d,
	* testsuite/gas/mips/branch-local-n64-2.d,
	* testsuite/gas/mips/branch-local-n64-3.d,
	* testsuite/gas/mips/branch-local-n64-5.d,
	* testsuite/gas/mips/branch-local-n64-6.d,
	* testsuite/gas/mips/branch-section-3.d,
	* testsuite/gas/mips/branch-section-4.d,
	* testsuite/gas/mips/branch-weak-3.d,
	* testsuite/gas/mips/branch-weak-4.d,
	* testsuite/gas/mips/break-error.d,
	* testsuite/gas/mips/crc-err.d,
	* testsuite/gas/mips/crc64-err.d,
	* testsuite/gas/mips/ginv-err.d,
	* testsuite/gas/mips/interaptiv-mr2@isa-override-1.d,
	* testsuite/gas/mips/interaptiv-mr2@isa-override-2.d,
	* testsuite/gas/mips/isa-override-2.d,
	* testsuite/gas/mips/lui-1.d,
	* testsuite/gas/mips/lui-2.d,
	* testsuite/gas/mips/macro-warn-1-n32.d,
	* testsuite/gas/mips/macro-warn-1.d,
	* testsuite/gas/mips/macro-warn-2.d,
	* testsuite/gas/mips/macro-warn-3.d,
	* testsuite/gas/mips/macro-warn-4.d,
	* testsuite/gas/mips/micromips-branch-delay.d,
	* testsuite/gas/mips/micromips-branch-relax-insn32-pic.d,
	* testsuite/gas/mips/micromips-branch-relax-insn32.d,
	* testsuite/gas/mips/micromips-branch-relax-pic.d,
	* testsuite/gas/mips/micromips-branch-relax.d,
	* testsuite/gas/mips/micromips-compact.d,
	* testsuite/gas/mips/micromips-insn32.d,
	* testsuite/gas/mips/micromips-noinsn32.d,
	* testsuite/gas/mips/micromips-size-1.d,
	* testsuite/gas/mips/micromips-trap.d,
	* testsuite/gas/mips/micromips-warn-branch-delay.d,
	* testsuite/gas/mips/micromips.d,
	* testsuite/gas/mips/micromips@addiu-error.d,
	* testsuite/gas/mips/micromips@mips5-fp.d,
	* testsuite/gas/mips/micromips@msa-relax.d,
	* testsuite/gas/mips/micromips@relax-at.d,
	* testsuite/gas/mips/micromips@relax-offset.d,
	* testsuite/gas/mips/micromips@relax.d,
	* testsuite/gas/mips/mips-gp32-fp64-pic.d,
	* testsuite/gas/mips/mips-gp32-fp64.d,
	* testsuite/gas/mips/mips-gp64-fp32-pic.d,
	* testsuite/gas/mips/mips-gp64-fp32.d,
	* testsuite/gas/mips/mips-gp64-fp64.d,
	* testsuite/gas/mips/mips16-32@mips16-insn-e.d,
	* testsuite/gas/mips/mips16-32@mips16-insn-t.d,
	* testsuite/gas/mips/mips16-32@mips16-macro-e.d,
	* testsuite/gas/mips/mips16-32@mips16-macro-t.d,
	* testsuite/gas/mips/mips16-32@mips16-macro.d,
	* testsuite/gas/mips/mips16-64@mips16-insn-e.d,
	* testsuite/gas/mips/mips16-64@mips16-insn-t.d,
	* testsuite/gas/mips/mips16-absolute-reloc-2.d,
	* testsuite/gas/mips/mips16-absolute-reloc-3.d,
	* testsuite/gas/mips/mips16-branch-addend-5.d,
	* testsuite/gas/mips/mips16-branch-unextended-1.d,
	* testsuite/gas/mips/mips16-branch-unextended-2.d,
	* testsuite/gas/mips/mips16-insn-e.d,
	* testsuite/gas/mips/mips16-insn-t.d,
	* testsuite/gas/mips/mips16-jal-t.d,
	* testsuite/gas/mips/mips16-macro-e.d,
	* testsuite/gas/mips/mips16-macro-t.d,
	* testsuite/gas/mips/mips16-pcrel-2.d,
	* testsuite/gas/mips/mips16-pcrel-3.d,
	* testsuite/gas/mips/mips16-pcrel-4.d,
	* testsuite/gas/mips/mips16-pcrel-5.d,
	* testsuite/gas/mips/mips16-pcrel-absolute-n64-4.d,
	* testsuite/gas/mips/mips16-pcrel-absolute-n64-6.d,
	* testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-4.d,
	* testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-6.d,
	* testsuite/gas/mips/mips16-pcrel-addend-n64-8.d,
	* testsuite/gas/mips/mips16-pcrel-addend-n64-9.d,
	* testsuite/gas/mips/mips16-pcrel-addend-pic-8.d,
	* testsuite/gas/mips/mips16-pcrel-addend-pic-9.d,
	* testsuite/gas/mips/mips16-pcrel-delay-0.d,
	* testsuite/gas/mips/mips16-pcrel-delay-1.d,
	* testsuite/gas/mips/mips16-pcrel-n64-0.d,
	* testsuite/gas/mips/mips16-pcrel-n64-1.d,
	* testsuite/gas/mips/mips16-pcrel-pic-0.d,
	* testsuite/gas/mips/mips16-pcrel-pic-1.d,
	* testsuite/gas/mips/mips16-reg-error.d,
	* testsuite/gas/mips/mips16-relax-unextended-1.d,
	* testsuite/gas/mips/mips16-relax-unextended-2.d,
	* testsuite/gas/mips/mips16-reloc-error.d,
	* testsuite/gas/mips/mips16-sdrasp.d,
	* testsuite/gas/mips/mips16@addiu-error.d,
	* testsuite/gas/mips/mips16e-32@mips16-insn-e.d,
	* testsuite/gas/mips/mips16e-32@mips16-insn-t.d,
	* testsuite/gas/mips/mips16e-32@mips16-macro-e.d,
	* testsuite/gas/mips/mips16e-32@mips16-macro-t.d,
	* testsuite/gas/mips/mips16e-32@mips16-macro.d,
	* testsuite/gas/mips/mips16e-32@mips16e-64.d,
	* testsuite/gas/mips/mips16e2-32@mips16-insn-e.d,
	* testsuite/gas/mips/mips16e2-32@mips16-insn-t.d,
	* testsuite/gas/mips/mips16e2-32@mips16-macro-e.d,
	* testsuite/gas/mips/mips16e2-32@mips16-macro-t.d,
	* testsuite/gas/mips/mips16e2-32@mips16-macro.d,
	* testsuite/gas/mips/mips16e2-32@mips16e-64.d,
	* testsuite/gas/mips/mips16e2-copy-err.d,
	* testsuite/gas/mips/mips16e2-imm-error.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-insn-e.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-insn-t.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-macro-e.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-macro-t.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-macro.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-sub.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16e-64-sub.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16e-64.d,
	* testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16e-sub.d,
	* testsuite/gas/mips/mips16e2-mt-err.d,
	* testsuite/gas/mips/mips16e2-reloc-error.d,
	* testsuite/gas/mips/mips16e2@lui-2.d,
	* testsuite/gas/mips/mips16e2@mips16-pcrel-2.d,
	* testsuite/gas/mips/mips16e2@mips16-pcrel-delay-0.d,
	* testsuite/gas/mips/mips16e2@mips16-pcrel-delay-1.d,
	* testsuite/gas/mips/mips1@isa-override-2.d,
	* testsuite/gas/mips/mips1@relax-offset.d,
	* testsuite/gas/mips/mips2@isa-override-2.d,
	* testsuite/gas/mips/mips32-mt.d,
	* testsuite/gas/mips/mips32@isa-override-2.d,
	* testsuite/gas/mips/mips32r2@isa-override-2.d,
	* testsuite/gas/mips/mips32r3@isa-override-2.d,
	* testsuite/gas/mips/mips32r5@isa-override-2.d,
	* testsuite/gas/mips/mips32r6@isa-override-2.d,
	* testsuite/gas/mips/mips5-fp.d,
	* testsuite/gas/mips/mips64-mips3d-incl.d,
	* testsuite/gas/mips/mips64-mips3d.d,
	* testsuite/gas/mips/mipsr6@mips5-fp.d,
	* testsuite/gas/mips/msa-relax.d,
	* testsuite/gas/mips/octeon3@isa-override-1.d,
	* testsuite/gas/mips/octeon3@isa-override-2.d,
	* testsuite/gas/mips/option-pic-relax-2.d,
	* testsuite/gas/mips/option-pic-relax-3.d,
	* testsuite/gas/mips/option-pic-relax-4.d,
	* testsuite/gas/mips/option-pic-relax-5.d,
	* testsuite/gas/mips/org-1.d,
	* testsuite/gas/mips/org-10.d,
	* testsuite/gas/mips/org-4.d,
	* testsuite/gas/mips/org-5.d,
	* testsuite/gas/mips/org-6.d,
	* testsuite/gas/mips/r3000@isa-override-2.d,
	* testsuite/gas/mips/r3000@relax-offset.d,
	* testsuite/gas/mips/r3900@isa-override-2.d,
	* testsuite/gas/mips/r3900@relax-offset.d,
	* testsuite/gas/mips/reginfo-2-n32.d,
	* testsuite/gas/mips/reginfo-2.d,
	* testsuite/gas/mips/relax-at.d,
	* testsuite/gas/mips/relax-offset.d,
	* testsuite/gas/mips/relax-swap1-mips1.d,
	* testsuite/gas/mips/relax-swap1-mips2.d,
	* testsuite/gas/mips/relax-swap2.d,
	* testsuite/gas/mips/relax.d,
	* testsuite/gas/mips/save-err.d,
	* testsuite/gas/mips/set-arch.d,
	* testsuite/gas/mips/xpa-err.d,
	* testsuite/gas/mips/xpa-virt-err.d,
	* testsuite/gas/msp430/bad.d,
	* testsuite/gas/msp430/errata_warns.d,
	* testsuite/gas/msp430/pr22133.d,
	* testsuite/gas/ppc/lsp-checks.d,
	* testsuite/gas/ppc/misalign.d,
	* testsuite/gas/ppc/spe2-checks.d,
	* testsuite/gas/riscv/bad-csr.d,
	* testsuite/gas/riscv/c-addi16sp-fail.d,
	* testsuite/gas/riscv/c-addi4spn-fail.d,
	* testsuite/gas/riscv/c-fld-fsd-fail.d,
	* testsuite/gas/riscv/c-lui-fail.d,
	* testsuite/gas/riscv/c-nonzero-imm.d,
	* testsuite/gas/riscv/c-nonzero-reg.d,
	* testsuite/gas/riscv/fence-fail.d,
	* testsuite/gas/riscv/lla64-fail.d,
	* testsuite/gas/riscv/rouding-fail.d,
	* testsuite/gas/sh/pcrel-hms.d,
	* testsuite/gas/sh/pcrel.d,
	* testsuite/gas/sparc/dcti-couples-v8.d,
	* testsuite/gas/sparc/dcti-couples-v9c.d,
	* testsuite/gas/tic6x/arch-invalid-1.d,
	* testsuite/gas/tic6x/arch-invalid-2.d,
	* testsuite/gas/tic6x/dir-junk.d,
	* testsuite/gas/tic6x/insns-bad-1.d,
	* testsuite/gas/tic6x/insns-bad-2.d,
	* testsuite/gas/tic6x/parallel-bad-1.d,
	* testsuite/gas/tic6x/parallel-bad-2.d,
	* testsuite/gas/tic6x/parallel-bad-3.d,
	* testsuite/gas/tic6x/parallel-bad-4.d,
	* testsuite/gas/tic6x/predicate-bad-1.d,
	* testsuite/gas/tic6x/predicate-bad-2.d,
	* testsuite/gas/tic6x/predicate-bad-3.d,
	* testsuite/gas/tic6x/reloc-bad-1.d,
	* testsuite/gas/tic6x/reloc-bad-2.d,
	* testsuite/gas/tic6x/reloc-bad-3.d,
	* testsuite/gas/tic6x/reloc-bad-4.d,
	* testsuite/gas/tic6x/reloc-bad-5.d,
	* testsuite/gas/tic6x/reloc-bad-6.d,
	* testsuite/gas/tic6x/resource-func-unit-1.d,
	* testsuite/gas/tic6x/resource-func-unit-2.d,
	* testsuite/gas/tic6x/sploop-bad-1.d,
	* testsuite/gas/tic6x/sploop-bad-2.d,
	* testsuite/gas/tic6x/sploop-bad-3.d,
	* testsuite/gas/tic6x/sploop-bad-4.d,
	* testsuite/gas/tic6x/sploop-bad-5.d,
	* testsuite/gas/tic6x/sploop-bad-6.d,
	* testsuite/gas/tic6x/sploop-bad-7.d,
	* testsuite/gas/tic6x/unwind-bad-1.d,
	* testsuite/gas/tic6x/unwind-bad-2.d,
	* testsuite/lib/gas-defs.exp (run_dump_tests): Replace stderr
	and error-output with warning_output and error_output.
	(slurp_options): Accept underscore rather than dash.
2018-09-15 16:24:18 +09:30
Alan Modra b47b60aad8 gas run_dump_test rename not-target and not-skip
Use notarget and noskip, like the ld testsuite.

	* testsuite/gas/aarch64/codealign.d,
	* testsuite/gas/aarch64/litpool.d,
	* testsuite/gas/aarch64/mapmisc.d,
	* testsuite/gas/aarch64/mapping.d,
	* testsuite/gas/aarch64/mapping2.d,
	* testsuite/gas/aarch64/mapping3.d,
	* testsuite/gas/aarch64/mapping4.d,
	* testsuite/gas/all/align.d,
	* testsuite/gas/all/fill-1.d,
	* testsuite/gas/all/incbin.d,
	* testsuite/gas/all/redef2.d,
	* testsuite/gas/all/redef3.d,
	* testsuite/gas/all/relax.d,
	* testsuite/gas/all/sleb128-2.d,
	* testsuite/gas/all/sleb128-4.d,
	* testsuite/gas/all/sleb128-5.d,
	* testsuite/gas/all/sleb128-7.d,
	* testsuite/gas/all/sleb128-9.d,
	* testsuite/gas/all/weakref1.d,
	* testsuite/gas/all/weakref1g.d,
	* testsuite/gas/all/weakref1l.d,
	* testsuite/gas/all/weakref1u.d,
	* testsuite/gas/all/weakref1w.d,
	* testsuite/gas/arm/abs12.d,
	* testsuite/gas/arm/arch4t.d,
	* testsuite/gas/arm/arch7.d,
	* testsuite/gas/arm/arch7a-mp.d,
	* testsuite/gas/arm/arch7em.d,
	* testsuite/gas/arm/archv8m-main-dsp-5.d,
	* testsuite/gas/arm/armv8a-automatic-hlt.d,
	* testsuite/gas/arm/armv8a-automatic-lda.d,
	* testsuite/gas/arm/attr-syntax.d,
	* testsuite/gas/arm/automatic-bw.d,
	* testsuite/gas/arm/automatic-cbz.d,
	* testsuite/gas/arm/automatic-clrex.d,
	* testsuite/gas/arm/automatic-lda.d,
	* testsuite/gas/arm/automatic-ldaex.d,
	* testsuite/gas/arm/automatic-ldaexb.d,
	* testsuite/gas/arm/automatic-ldrex.d,
	* testsuite/gas/arm/automatic-ldrexd.d,
	* testsuite/gas/arm/automatic-movw.d,
	* testsuite/gas/arm/automatic-sdiv.d,
	* testsuite/gas/arm/automatic-strexb.d,
	* testsuite/gas/arm/barrier-thumb.d,
	* testsuite/gas/arm/barrier.d,
	* testsuite/gas/arm/bignum1.d,
	* testsuite/gas/arm/blx-bad.d,
	* testsuite/gas/arm/blx-local.s,
	* testsuite/gas/arm/crc32-armv8-a-bad.d,
	* testsuite/gas/arm/crc32-armv8-a.d,
	* testsuite/gas/arm/crc32-armv8-r-bad.d,
	* testsuite/gas/arm/crc32-armv8-r.d,
	* testsuite/gas/arm/eabi_attr_1.d,
	* testsuite/gas/arm/fp-save.d,
	* testsuite/gas/arm/local_function.d,
	* testsuite/gas/arm/local_label_coff.d,
	* testsuite/gas/arm/local_label_wince.d,
	* testsuite/gas/arm/mapping.d,
	* testsuite/gas/arm/mapping2.d,
	* testsuite/gas/arm/mapping3.d,
	* testsuite/gas/arm/mapping4.d,
	* testsuite/gas/arm/mapshort-elf.d,
	* testsuite/gas/arm/mask_1-armv8-a.d,
	* testsuite/gas/arm/mask_1-armv8-r.d,
	* testsuite/gas/arm/mrs-msr-thumb-v6t2.d,
	* testsuite/gas/arm/mrs-msr-thumb-v7-m.d,
	* testsuite/gas/arm/mrs-msr-thumb-v7e-m.d,
	* testsuite/gas/arm/nomapping.d,
	* testsuite/gas/arm/pic.d,
	* testsuite/gas/arm/pic_vxworks.d,
	* testsuite/gas/arm/plt-1.d,
	* testsuite/gas/arm/reloc-bad.d,
	* testsuite/gas/arm/reloc-fdpic.d,
	* testsuite/gas/arm/t2-branch-global.d,
	* testsuite/gas/arm/thumb.d,
	* testsuite/gas/arm/thumb2_ldr_immediate_armv6.d,
	* testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.d,
	* testsuite/gas/arm/thumb2_pool.d,
	* testsuite/gas/arm/thumb2_vpool.d,
	* testsuite/gas/arm/thumb2_vpool_be.d,
	* testsuite/gas/arm/thumb32.d,
	* testsuite/gas/arm/thumbver.d,
	* testsuite/gas/arm/tls.d,
	* testsuite/gas/arm/tls_vxworks.d,
	* testsuite/gas/arm/undefined_coff.d,
	* testsuite/gas/arm/unwind.d,
	* testsuite/gas/arm/unwind_vxworks.d,
	* testsuite/gas/arm/v4bx.d,
	* testsuite/gas/arm/vfma1.d,
	* testsuite/gas/arm/vldm-arm.d,
	* testsuite/gas/arm/weakdef-1.d,
	* testsuite/gas/arm/weakdef-2.d,
	* testsuite/gas/arm/wince.d,
	* testsuite/gas/arm/wince_inst.d,
	* testsuite/gas/elf/bignums.d,
	* testsuite/gas/elf/common5a.d,
	* testsuite/gas/elf/common5b.d,
	* testsuite/gas/elf/common5c.d,
	* testsuite/gas/elf/common5d.d,
	* testsuite/gas/elf/dwarf2-1.d,
	* testsuite/gas/elf/dwarf2-10.d,
	* testsuite/gas/elf/dwarf2-11.d,
	* testsuite/gas/elf/dwarf2-12.d,
	* testsuite/gas/elf/dwarf2-13.d,
	* testsuite/gas/elf/dwarf2-14.d,
	* testsuite/gas/elf/dwarf2-15.d,
	* testsuite/gas/elf/dwarf2-16.d,
	* testsuite/gas/elf/dwarf2-17.d,
	* testsuite/gas/elf/dwarf2-18.d,
	* testsuite/gas/elf/dwarf2-2.d,
	* testsuite/gas/elf/dwarf2-3.d,
	* testsuite/gas/elf/dwarf2-4.d,
	* testsuite/gas/elf/dwarf2-5.d,
	* testsuite/gas/elf/dwarf2-6.d,
	* testsuite/gas/elf/dwarf2-7.d,
	* testsuite/gas/elf/dwarf2-8.d,
	* testsuite/gas/elf/dwarf2-9.d,
	* testsuite/gas/elf/group0c.d,
	* testsuite/gas/elf/group1a.d,
	* testsuite/gas/elf/group2.d,
	* testsuite/gas/elf/groupautoa.d,
	* testsuite/gas/elf/ifunc-1.d,
	* testsuite/gas/elf/section11.d,
	* testsuite/gas/elf/section4.d,
	* testsuite/gas/elf/section7.d,
	* testsuite/gas/elf/syms.d,
	* testsuite/gas/elf/symver.d,
	* testsuite/gas/i386/iamcu-1.d,
	* testsuite/gas/i386/iamcu-2.d,
	* testsuite/gas/i386/iamcu-3.d,
	* testsuite/gas/i386/iamcu-4.d,
	* testsuite/gas/i386/iamcu-5.d,
	* testsuite/gas/i386/ilp32/rex.d,
	* testsuite/gas/i386/k1om.d,
	* testsuite/gas/i386/l1om.d,
	* testsuite/gas/i386/rex.d,
	* testsuite/gas/mach-o/sections-3.d,
	* testsuite/gas/macros/irp.d,
	* testsuite/gas/macros/repeat.d,
	* testsuite/gas/macros/rept.d,
	* testsuite/gas/macros/semi.d,
	* testsuite/gas/macros/test2.d,
	* testsuite/gas/macros/test3.d,
	* testsuite/gas/macros/vararg.d,
	* testsuite/gas/mips/jal-svr4pic-local.d,
	* testsuite/gas/mips/micromips@jal-svr4pic-local.d,
	* testsuite/gas/mips/mips1@jal-svr4pic-local.d,
	* testsuite/gas/mips/r3000@jal-svr4pic-local.d,
	* testsuite/gas/ppc/machine.d,
	* testsuite/lib/gas-defs.exp (run_dump_test): Replace not-target
	and not-skip with notarget and noskip.
2018-09-15 16:24:18 +09:30
Alan Modra 04ade4bc66 Remove run_dump_test support for objcopy as a dump program
We have three copies of run_dump_test in the testsuite.  This is a first
step towards consolidating them.

A few tests use objcopy to convert to verilog or srec output, then
check that output is as expected.  Those tests can just as easily use
objdump, keeping the set of dump programs (addr2line, nm, objdump,
readelf, size) separate from utilities under test.  That in turn makes
auto-detecting the dump program possible in more places.

binutils/
	* testsuite/binutils-all/group-7a.d,
	* testsuite/binutils-all/group-7b.d,
	* testsuite/binutils-all/group-7c.d,
	* testsuite/binutils-all/symbols-1.d,
	* testsuite/binutils-all/symbols-2.d,
	* testsuite/binutils-all/symbols-3.d,
	* testsuite/binutils-all/symbols-4.d: Remove DUMPPROG.
gas/
	* testsuite/gas/mri/char.d: Don't objcopy to srec, objdump instead.
	* testsuite/gas/mri/float.d: Likewise.
	* testsuite/lib/gas-defs.exp (run_dump_test): Remove support
	for objcopy as a dump tool.
ld/
	* testsuite/ld-elf/interleave-0.d,
	* testsuite/ld-elf/interleave-4.d: Don't objcopy to srec,
	objdump instead.
	* testsuite/ld-gc/all-debug-sections.d,
	* testsuite/ld-scripts/provide-4.d,
	* testsuite/ld-scripts/provide-5.d,
	* testsuite/ld-scripts/provide-6.d,
	* testsuite/ld-scripts/provide-7.d,
	* testsuite/ld-scripts/provide-8.d,
	* testsuite/ld-scripts/segment-start.d: Remove PROG, specify
	nm instead.
	* testsuite/lib/ld-lib.exp (run_dump_test): Remove support
	for objcopy as a dump tool.
2018-09-15 16:24:18 +09:30
H.J. Lu 606cc04085 x86: Check non-WIG EVEX instruction encoding with -mevexwig=1
Verify that -mevexwig=1 has no impact on non-WIG EVEX instruction encoding.

	PR gas/23642
	* testsuite/gas/i386/evex-wig2.d: New file.
	* testsuite/gas/i386/evex-wig2.s: Likewise.
	* testsuite/gas/i386/x86-64-evex-wig2.d: Likewise.
	* testsuite/gas/i386/x86-64-evex-wig2.s: Likewise.
	* testsuite/gas/i386/i386.exp: Run evex-wig2 and
	x86-64-evex-wig2.
2018-09-14 12:21:19 -07:00
H.J. Lu 6865c0435a x86: Support VEX/EVEX WIG encoding
Add VEXWIG, defined as 3, to indicate that the VEX.W/EVEX.W bit is
ignored by such VEX/EVEX instructions, aka WIG instructions.  Set
VexW=3 on VEX/EVEX WIG instructions.  Update assembler to check
VEXWIG when setting the VEX.W bit.

gas/

	PR gas/23642
	* config/tc-i386.c (build_vex_prefix): Check VEXWIG when setting
	the VEX.W bit.
	(build_evex_prefix): Check VEXWIG when setting the EVEX.W bit.

opcodes/

	PR gas/23642
	* i386-opc.h (VEXWIG): New.
	* i386-opc.tbl: Set VexW=3 on VEX/EVEX WIG instructions.
	* i386-tbl.h: Regenerated.
2018-09-14 12:20:10 -07:00
H.J. Lu 70df6fc9bc x86: Handle unsupported static rounding in vcvt[u]si2sd in 32-bit mode
Update x86 disassembler to handle the unsupported static rounding in
vcvt[u]si2sd in 32-bit mode.

gas/

	PR binutils/23655
	* testsuite/gas/i386/evex.d: Updated.

opcodes/

	PR binutils/23655
	* i386-dis-evex.h: Replace EXxEVexR with EXxEVexR64 for
	vcvtsi2sd%LQ and vcvtusi2sd%LQ.
	* i386-dis.c (EXxEVexR64): New.
	(evex_rounding_64_mode): Likewise.
	(OP_Rounding): Handle evex_rounding_64_mode.
2018-09-14 11:25:13 -07:00
H.J. Lu d20dee9efa x86: Properly decode EVEX.W in vcvt[u]si2s[sd] in 32-bit mode
Update x86 disassembler to ignore the EVEX.W bit in EVEX vcvt[u]si2s[sd]
instructions in 32-bit mode.

gas/

	PR binutils/23655
	* testsuite/gas/i386/evex.d: New file.
	* testsuite/gas/i386/evex.s: Likewise.
	* testsuite/gas/i386/i386.exp: Run evex.

opcodes/

	PR binutils/23655
	* i386-dis-evex.h (evex_table): Replace Eq with Edqa for
	vcvtsi2ss%LQ, vcvtsi2sd%LQ, vcvtusi2ss%LQ and vcvtusi2sd%LQ.
	* i386-dis.c (Edqa): New.
	(dqa_mode): Likewise.
	(intel_operand_size): Handle dqa_mode as m_mode.
	(OP_E_register): Handle dqa_mode as dq_mode.
	(OP_E_memory): Set shift for dqa_mode based on address_mode.
2018-09-14 10:49:53 -07:00
Lifang Xia fe75f42ee1 csky: Support PC relative diff relocation
Define DIFF_EXPR_OK to Support PC relative diff relocation,
and add CKCORE_PCREL32 relocation process

bfd/
        * elf32-csky.c (csky_elf_howto_table): Fill special_function of
        R_CKCORE_PCREL32.
        (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
gas/
        * config/tc-csky.c (md_apply_fix): Transmit
        BFD_RELOC_32_PCREL to BFD_RELOC_CKCORE_PCREL32.
        (tc_gen_reloc): Trasmit BFD_RELOC_CKCORE_ADDR32 to
        BFD_RELOC_CKCORE_PCREL32 while pc-relative.
        * config/tc-csky.h (DIFF_EXPR_OK): Define to enable PC relative
        diff relocs.
2018-09-14 21:04:47 +08:00
Jan Beulich 556059dd13 x86: fold CRC32 templates
Just like other insns having byte and word forms, these can also make
use of the W modifier, which at the same time allows simplifying some
other code a little bit.
2018-09-14 11:21:15 +02:00
H.J. Lu 79f0fa25b9 x86: Swap destination/source to encode VEX only if possible
When encoding VEX, we can swap destination and source only if there are
more than 1 register operand.

	* config/tc-i386.c (build_vex_prefix): Swap destination and
	source only if there are more than 1 register operand.
2018-09-13 06:12:31 -07:00
Jan Beulich f5eb1d70fb x86: also allow D on 3-operand insns
For now this is just for VMOVS{D,S}.
2018-09-13 11:07:55 +02:00
Jan Beulich dbbc8b7e62 x86: use D attribute also for SIMD templates
Various moves come in load and store forms, and just like on the GPR
and FPU sides there would better be only one pattern. In some cases this
is not feasible because the opcodes are too different, but quite a few
cases follow a similar standard scheme. Introduce Opcode_SIMD_FloatD and
Opcode_SIMD_IntD, generalize handling in operand_size_match() (reverse
operand handling there simply needs to match "straight" operand one),
and fix a long standing, but so far only latent bug with when to zap
found_reverse_match.

Also once again drop IgnoreSize where pointlessly applied to templates
touched anyway as well as *word when redundant with Reg*.
2018-09-13 11:07:07 +02:00
Jan Beulich efb192033a x86: fold ILP32 output of "opts" tests
The output is identical to that of the LP64 tests. No need to fully
spell this out twice.
2018-09-13 11:06:07 +02:00
Jan Beulich 64c49ab3fb x86: improve operand reversal
In quite a few cases the .s suffix or {load} / {store} prefixes did not
work as intended, or produced errors when they're supposed to be ignored
when it is not possible to carry out the request.

The change here re-purposes(?) the .s suffix to no longer mean "store"
(if that's what 's' did stand for), since the forms used in the base
templates are not consistently loads (and we unlikely want to change
that). The pseudo prefixes will now fulfill what their names say, i.e.
{load} now only ever produces a load form encoding (if available) while
{store} only ever produces a store form one (again if available). This
requires minimal test suite adjustments, while the majority of the
changes there are simply additions.
2018-09-13 11:05:27 +02:00
Jan Beulich 07d5e9534b x86: add code comment on deprecated status of pseudo-suffixes 2018-09-13 11:04:38 +02:00
Jan Beulich d276ec695e x86-64: bndmk, bndldx, and bndstx don't allow RIP-relative addressing 2018-09-13 11:03:35 +02:00
Nick Clifton 031e33500e Fix the use by the RL78 assembler of an uninitialised field in the expresion structure.
* dwarf2dbg.c (generic_dwarf2_emit_offset): Use memset to
	initialise expression structure.
	(set_or_check_view): Likewise.
	(out_set_addr): Likewise.
	(emit_fixed_inc_line_addr): Likewise.
	(relax_inc_line_addr): Likewise.
	(out_debug_line): Likewise.
	(out_debug_ranges): Likewise.
	(out_debug_aranges): Likewise.
	(out_debug_info): Likewise.
2018-09-13 09:34:53 +01:00
Alan Modra deee88e981 PR23570, AVR .noinit section defaults to PROGBITS
Revert commit 8744470dea and instead use the standard special_sections
support.

	PR 23570
bfd/
	* elf32-avr.c (elf_avr_special_sections): New.
	(elf_backend_special_sections): Define.
gas/
	* config/tc-avr.c: Revert 2018-09-03 change.
2018-09-06 14:13:00 +09:30
Daniel Cederman 618a8fdba6 gas, sparc: Allow non-fpop2 instructions before floating point branches
Sparc V8 does not allow fpop2 instructions (floating point
comparisons) immediately before floating point branches.  From the
SPARC Architecture Manual Version 8, section B.22 "Branch on
Floating-point Condition Codes Instructions":

"If the instruction executed immediately before an FBfcc is an FPop2
instruction, the result of the FBfcc is undefined.  Therefore, at
least one non FPop2 instruction should be executed between the FPop2
instruction and the FBfcc instruction."

The existing check in GAS, however, does not allow any kind of
floating point instruction before the branch.  This patch adds an
extra condition to only disallow fpop2 instructions.

gas/ChangeLog:

2018-09-04  Daniel Cederman  <cederman@gaisler.com>

	* config/tc-sparc.c (md_assemble): Allow non-fpop2 instructions
            before floating point branches for Sparc V8 and earlier.
	* testsuite/gas/sparc/sparc.exp: Execute the new test.
	* testsuite/gas/sparc/v8branch.d: New test.
	* testsuite/gas/sparc/v8branch.s: New test.
2018-09-04 06:25:52 -07:00
Nick Clifton 8744470dea Change the .section directive for the AVR assembler so that the .noinit section is always given the ELF NOBITS section type.
PR gas/23570
	* config/tc-avr.c (md_pseudo_table): Add entry for "secction".
	(avr_set_section): New function.  Ensures that the .noinit section
	gets the NOBITS ELF section type.
2018-09-03 17:06:45 +01:00
Jim Wilson be192bc284 RISC-V: Correct the requirement of compressed floating point instructions
2018-08-31  Kito Cheng  <kito@andestech.com>
gas/
	* testsuite/gas/riscv/c-fld-fsd-fail.d: New.
	* testsuite/gas/riscv/c-fld-fsd-fail.l: Likewise.
	* testsuite/gas/riscv/c-fld-fsd-fail.s: Likewise.
opcodes/
	* riscv-opc.c (riscv_opcodes): Fix incorrect subset info for
	compressed floating point instructions.
2018-08-31 12:23:05 -07:00
H.J. Lu 6e1453f681 gas/elf/section14.d: Change skip to xfail
We will get an XPASS when h8300 port peculiarities are fixed, and will
fix the testsuite too.

	* testsuite/gas/elf/section14.d: Change skip to xfail.
	* testsuite/lib/gas-defs.exp (run_dump_test): Add xfail support.
2018-08-31 09:40:54 -07:00
Alan Modra 4a9699735b PowerPC64 higher REL16 relocations
There are occasions where someone might want to build a 64-bit
pc-relative offset from 16-bit pieces.  This adds the necessary REL16
relocs corresponding to existing ADDR16 relocs that can be used to
build 64-bit absolute values.

include/
	* elf/ppc64.h (R_PPC64_REL16_HIGH, R_PPC64_REL16_HIGHA),
	(R_PPC64_REL16_HIGHER, R_PPC64_REL16_HIGHERA),
	(R_PPC64_REL16_HIGHEST, R_PPC64_REL16_HIGHESTA): Define.
	(R_PPC64_LO_DS_OPT, R_PPC64_16DX_HA): Bump value.
bfd/
	* reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
	(BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
	(BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
	Define.
	* elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
	(ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
	(ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
gas/
	* config/tc-ppc.h (TC_FORCE_RELOCATION_SUB_LOCAL): Allow ADDR16
	HIGH, HIGHA, HIGHER, HIGHERA, HIGHEST, and HIGHESTA relocs.
	Group 16-bit relocs.
	* config/tc-ppc.c (md_apply_fix): Translate those ADDR16 relocs
	to REL16 when pcrel.  Sort relocs.
2018-08-31 22:15:05 +09:30
H.J. Lu 5e8a54c6c4 gas: Pass -mx86-used-note=no to assembler
Since x86 assembler may generate .note.gnu.property section, pass
-mx86-used-note=no to assembler for section2 test on ELF/x86 targets
to avoid .note.gnu.property section.

	* testsuite/gas/elf/elf.exp: Pass -mx86-used-note=no to
	assembler for section2 test on ELF/x86 targets.
2018-08-31 04:43:06 -07:00
H.J. Lu 2550e95256 x86: pass -mx86-used-note=no to assembler
Since cfi/cfi-label.d is ELF/x86 specific, we can pass -mx86-used-note=no
to assembler.

	* testsuite/gas/cfi/cfi-label.d: Pass -mx86-used-note=no to
	assembler.
2018-08-31 04:39:33 -07:00
H.J. Lu 6c0d3bdec7 x86: Add explicit -mx86-used-note=[yes|no] to tests
Pass explicit -mx86-used-note=[yes|no] to x86 assembler and update
expected outputs from "readelf -n" if needed.

binutils/

	* testsuite/binutils-all/i386/compressed-1b.d: Pass
	-mx86-used-note=no to assembler.
	* testsuite/binutils-all/i386/compressed-1c.d: Likewise.
	* testsuite/binutils-all/x86-64/compressed-1b.d: Likewise.
	* testsuite/binutils-all/x86-64/compressed-1c.d: Likewise.
	* testsuite/binutils-all/i386/empty.d: Pass -mx86-used-note=yes
	to assembler and update expected output from "readelf -n".
	* testsuite/binutils-all/i386/ibt.d: Likewise.
	* testsuite/binutils-all/i386/pr21231a.d: Likewise.
	* testsuite/binutils-all/i386/pr21231b.d: Likewise.
	* testsuite/binutils-all/i386/shstk.d: Likewise.
	* testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/empty.d: Likewise.
	* testsuite/binutils-all/x86-64/ibt-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/ibt.d: Likewise.
	* testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
	* testsuite/binutils-all/x86-64/shstk-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/shstk.d: Likewise.

gas/

	* testsuite/gas/i386/bss.d: Pass -mx86-used-note=no to assembler.
	* testsuite/gas/i386/ilp32/quad.d: Likewise.
	* testsuite/gas/i386/ilp32/reloc64.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-1.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-3.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-5.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-unwind.d: Likewise.
	* testsuite/gas/i386/property-1.d: Likewise.
	* testsuite/gas/i386/relax.d: Likewise.
	* testsuite/gas/i386/reloc64.d: Likewise.
	* testsuite/gas/i386/size-1.d: Likewise.
	* testsuite/gas/i386/size-3.d: Likewise.
	* testsuite/gas/i386/x86-64-property-1.d: Likewise.
	* testsuite/gas/i386/x86-64-size-1.d: Likewise.
	* testsuite/gas/i386/x86-64-size-3.d: Likewise.
	* testsuite/gas/i386/x86-64-size-5.d: Likewise.
	* testsuite/gas/i386/x86-64-unwind.d: Likewise.
	* testsuite/gas/i386/divide.d: Append "#pass".

ld/

	* testsuite/ld-i386/i386.exp: (ASFLAGS): Save, append
	-mx86-used-note=no and restore.  Pass -mx86-used-note=yes and
	-mx86-used-note=no to assembler.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/no-plt.exp: Pass -mx86-used-note=yes to
	assembler.
	* testsuite/ld-i386/tls.exp: Likewise.
	* testsuite/ld-x86-64/no-plt.exp: Likewise.
	* testsuite/ld-x86-64/tls.exp: Likewise.
	* testsuite/ld-i386/pr23486a.d: Pass -mx86-used-note=no to
	assembler.
	* testsuite/ld-i386/pr23486b.d: Likewise.
	* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
	* testsuite/ld-x86-64/pr23486a-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486a.d: Likewise.
	* testsuite/ld-x86-64/pr23486b-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486b.d: Likewise.
	* testsuite/ld-i386/property-x86-3.d: Pass -mx86-used-note=yes
	to assembler and update expected output from "readelf -n".
	* testsuite/ld-i386/property-x86-4a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt1a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt1b.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt2.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt4.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt5.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk1a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk1b.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk2.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk4.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-3.d: Likewise.
	* testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-4a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk5.d: Likewise.
	* testsuite/ld-i386/property-1a.r: New file.
	* testsuite/ld-i386/property-2a.r: Likewise.
	* testsuite/ld-i386/property-3a.r: Likewise.
	* testsuite/ld-i386/property-4a.r: Likewise.
	* testsuite/ld-i386/property-5a.r: Likewise.
	* testsuite/ld-i386/property-7a.r: Likewise.
	* testsuite/ld-x86-64/property-1a.r: Likewise.
	* testsuite/ld-x86-64/property-2a.r: Likewise.
	* testsuite/ld-x86-64/property-3a.r: Likewise.
	* testsuite/ld-x86-64/property-4a.r: Likewise.
	* testsuite/ld-x86-64/property-5a.r: Likewise.
	* testsuite/ld-x86-64/property-7a.r: Likewise.
	* testsuite/ld-x86-64/mpx.exp: Pass -mx86-used-note=no to
	assembler.
2018-08-31 04:35:57 -07:00
H.J. Lu b4a3a7b44c x86: Extend assembler to generate GNU property notes
Add -mx86-used-note=[yes|no] option to generate (or not) GNU property
notes with GNU_PROPERTY_X86_FEATURE_2_USED and GNU_PROPERTY_X86_ISA_1_USED
properties.  If the assembly input contains no instructions, set the
GNU_PROPERTY_X86_UINT32_VALID bit in GNU_PROPERTY_X86_FEATURE_2_USED
property.  Add a --enable-x86-used-note configure time option to set the
default behavior.  Set the default if the configure option is not used
to "no".

	* NEWS: Mention -mx86-used-note=[no|yes].
	* configure.ac: Add --enable-x86-used-note.  Define
	DEFAULT_X86_USED_NOTE.
	* config.in: Regenerated.
	* configure: Likewise.
	* config/tc-i386.c (x86_isa_1_used): New.
	(x86_feature_2_used): Likewise.
	(x86_used_note): Likewise.
	(_i386_insn): Add has_regmmx, has_regxmm, has_regymm and
	has_regzmm.
	(build_modrm_byte): Set i.has_regmmx, i.has_regzmm.
	i.has_regymm and i.has_regxmm.
	(x86_cleanup): New function.
	(output_insn): Update x86_isa_1_used and x86_feature_2_used.
	(OPTION_X86_USED_NOTE): New.
	(md_longopts): Add -mx86-used-note=.
	(md_parse_option): Handle OPTION_X86_USED_NOTE.
	(md_show_usage): Display -mx86-used-note=.
	* config/tc-i386.h (x86_cleanup): New prototype.
	(md_cleanup): New.
	* doc/c-i386.texi: Document -mx86-used-note=.
2018-08-31 04:31:20 -07:00
Jose E. Marchesi 40bac49b63 sparc: gas: leon.d: disassemble assuming v8 also in sparc64 targets.
gas/ChangeLog:

2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* testsuite/gas/sparc/leon.d: Disassemble v8 code also in sparc64
	targets.
2018-08-30 23:37:45 +02:00
Jim Wilson 43135d3b15 RISC-V: Allow instruction require more than one extension
2018-08-29  Kito Cheng  <kito@andestech.com>

gas/
	* config/tc-riscv.c (riscv_subset_supports): New argument:
	xlen_required.
	(riscv_multi_subset_supports): New function, able to check more
	than one extension.
	(riscv_ip): Use riscv_multi_subset_supports instead of
	riscv_subset_supports.
	(riscv_set_arch): Update call-site for riscv_subset_supports.
	(riscv_after_parse_args): Likewise.

include/
	*opcode/riscv.h (MAX_SUBSET_NUM): New.
	(riscv_opcode): Add xlen_requirement field and change type of
	subset.

opcodes/
	* riscv-dis.c (riscv_disassemble_insn): Check XLEN by
	riscv_opcode.xlen_requirement.
	* riscv-opc.c (riscv_opcodes): Update for struct change.
2018-08-30 13:23:12 -07:00
H.J. Lu a869991180 Skip elf/section14 test for h8300 targets
Skip elf/section14 test for h8300 targets since the h8300 port issues a
warning message for new sections created without atrributes.

	* testsuite/gas/elf/section14.d: Skip h8300 targets.
2018-08-30 11:06:16 -07:00
H.J. Lu 385e5b9039 Treat SHT_FINI_ARRAY and SHT_PREINIT_ARRAY as relocatable sections
Since SHT_FINI_ARRAY and SHT_PREINIT_ARRAY sections are relocatable,
this patch fixes readelf and adds a testcase.

binutils/

	* readelf.c (process_section_headers): Treat SHT_FINI_ARRAY and
	SHT_PREINIT_ARRAY as relocatable sections.

gas/

	* testsuite/gas/elf/elf.exp: Run section14.
	* testsuite/gas/elf/section14.d: New file.
	* testsuite/gas/elf/section14.s: Likewise.
2018-08-30 08:03:34 -07:00
Martin Aberg df28970fcc sparc/leon: add support for partial write psr instruction
Partial write %PSR (PWRPSR) is a SPARC V8e option that allows the WRPSR
instruction to only affect the %PSR.ET field. When available it is enabled
by setting the rd field of the WRPSR instruction to a value other than 0.
For Leon processors with support for partial write %PSR (currently GR740
and GR716) the rd value must be 1.

opcodes/ChangeLog:

2018-08-29  Martin Aberg  <maberg@gaisler.com>

        * sparc-opc.c (sparc_opcodes): Add Leon specific partial write
        psr (PWRPSR) instruction.

gas/ChangeLog:

2018-08-29  Daniel Cederman  <cederman@gaisler.com>

        * testsuite/gas/sparc/leon.d: New test.
        * testsuite/gas/sparc/leon.s: New test.
        * testsuite/gas/sparc/sparc.exp: Execute the pwrpsr test.
2018-08-29 20:52:28 +02:00
Chenghua Xu 9108bc33b1 [MIPS] Add Loongson 2K1000 proccessor support.
bfd/
	* archures.c (bfd_architecture): New machine
	bfd_mach_mips_gs264e.
	* bfd-in2.h (bfd_architecture): Likewise.
	* cpu-mips.c (enum I_xxx): Likewise.
	(arch_info_struct): Likewise.
	* elfxx-mips.c (_bfd_elf_mips_mach): Handle
	E_MIPS_MACH_GS264E.
	(mips_set_isa_flags): Likewise.
	(mips_mach_extensions): Map bfd_mach_mips_gs264e to
	bfd_mach_mips_gs464e extension.

binutils/
	* NEWS: Mention Loongson 2K1000 proccessor support.
	* readelf.c (get_machine_flags): Handle gs264e.

elfcpp/
	* mips.c (EF_MIPS_MACH): New E_MIPS_MACH_GS264E.

gas/
	* config/tc-mips.c (ISA_HAS_ODD_SINGLE_FPR): Exclude CPU_GS264E.
	(mips_cpu_info_table): Add gs264e descriptors.
	* doc/as.texi (march table): Add gs264e.

include/
	* elf/mips.h (E_MIPS_MACH_XXX): New E_MIPS_MACH_GS264E.
	* opcode/mips.h (CPU_XXX): New CPU_GS264E.

ld/
	* testsuite/ld-mips-elf/mips-elf-flags.exp: Run good_combination
	gs264e and gs464e.

opcodes/
	* mips-dis.c (mips_arch_choices): Add gs264e descriptors.
2018-08-29 20:55:25 +08:00
Chenghua Xu bd782c07b9 [MIPS] Add Loongson 3A2000/3A3000 proccessor support.
bfd/
	* archures.c (bfd_architecture): New machine
	bfd_mach_mips_gs464e.
	* bfd-in2.h (bfd_architecture): Likewise.
	* cpu-mips.c (enum I_xxx): Likewise.
	(arch_info_struct): Likewise.
	* elfxx-mips.c (_bfd_elf_mips_mach): Handle
	E_MIPS_MACH_GS464E.
	(mips_set_isa_flags): Likewise.
	(mips_mach_extensions): Map bfd_mach_mips_gs464e to
	bfd_mach_mips_gs464 extension.

binutils/
	* NEWS: Mention Loongson 3A2000/3A3000 proccessor support.
	* readelf.c (get_machine_flags): Handle gs464e.

elfcpp/
	* mips.c (EF_MIPS_MACH): New E_MIPS_MACH_GS464E.

gas/
	* config/tc-mips.c (ISA_HAS_ODD_SINGLE_FPR): Exclude CPU_GS464E.
	(mips_cpu_info_table): Add gs464e descriptors.
	* doc/as.texi (march table): Add gs464e.

include/
	* elf/mips.h (E_MIPS_MACH_XXX): New E_MIPS_MACH_GS464E.
	* opcode/mips.h (CPU_XXX): New CPU_GS464E.

ld/
	* testsuite/ld-mips-elf/mips-elf-flags.exp: Run good_combination
	gs464e and gs464.

opcodes/
	* mips-dis.c (mips_arch_choices): Add gs464e descriptors.
2018-08-29 20:43:19 +08:00
Chenghua Xu ac8cb70f36 [MIPS] Add Loongson 3A1000 proccessor support.
bfd/
	* archures.c (bfd_architecture): Rename
	bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
	* bfd-in2.h (bfd_architecture): Likewise.
	* cpu-mips.c (enum I_xxx): Likewise.
	(arch_info_struct): Likewise.
	* elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
	(mips_set_isa_flags): Likewise.
	(mips_mach_extensions): Likewise.
	(bfd_mips_isa_ext_mach): Likewise.
	(bfd_mips_isa_ext): Likewise.
	(print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.

binutils/
	* NEWS: Mention Loongson 3A1000 proccessor support.
	* readelf.c (get_machine_flags): Rename loongson-3a to gs464.
	(print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.

elfcpp/
	* mips.c (EF_MIPS_MACH): Rename E_MIPS_MACH_LS3A to
	E_MIPS_MACH_GS464.

gas/
	* config/tc-mips.c (ISA_HAS_ODD_SINGLE_FPR): Rename
	CPU_LOONGSON_3A to CPU_GS464.
	(mips_cpu_info_table): Add gs464 descriptors, Keep
	loongson3a as an alias of gs464 for compatibility.
	* doc/as.texi (march table): Rename loongson3a to gs464.
	* testsuite/gas/mips/loongson-3a-mmi.d: Set "ISA Extension"
	flag to None.

gold/
	* mips.cc (Mips_mach, add_machine_extensions, elf_mips_mach):
	Rename loongson3a to gs464.
	(mips_isa_ext_mach, mips_isa_ext): Delete loongson3a.
	(infer_abiflags): Use ases instead of isa_ext for infer ABI
flags.
	(elf_mips_mach_name): Rename loongson3a to gs464.

include/
	* elf/mips.h (E_MIPS_MACH_XXX): Rename E_MIPS_MACH_LS3A to
	E_MIPS_MACH_GS464.
	(AFL_EXT_XXX): Delete AFL_EXT_LOONGSON_3A.
	* opcode/mips.h (INSN_XXX): Delete INSN_LOONGSON_3A.
	(CPU_XXX): Rename CPU_LOONGSON_3A to CPU_GS464.
	* opcode/mips.h (mips_isa_table): Delete CPU_LOONGSON_3A case.

ld/
	* testsuite/ld-mips-elf/mips-elf-flags.exp: Rename loongson3a
	to gs464.

opcodes/
	* mips-dis.c (mips_arch_choices): Add gs464 descriptors, Keep
	loongson3a as an alias of gs464 for compatibility.
	* mips-opc.c (mips_opcodes): Change Comments.
2018-08-29 20:32:30 +08:00
Chenghua Xu a693765e23 [MIPS/GAS] Add Loongson EXT2 Instructions support.
bfd/
	* elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.

binutils/
	* readelf.c (print_mips_ases): Add Loongson EXT2 extension.

gas/
	* NEWS: Mention Loongson EXTensions R2 (EXT2) support.
	* config/tc-mips.c (options): Add OPTION_LOONGSON_EXT2 and
	OPTION_NO_LOONGSON_EXT2.
	(md_longopts): Likewise.
	(mips_ases): Define availability for EXT.
	(mips_convert_ase_flags): Map ASE_LOONGSON_EXT2 to
	AFL_ASE_LOONGSON_EXT2.
	(md_show_usage): Add help for -mloongson-ext2 and
	-mno-loongson-ext2.
	* doc/as.texi: Document -mloongson-ext2, -mno-loongson-ext2.
	* doc/c-mips.texi: Document -mloongson-ext2, -mno-loongson-ext2,
	.set loongson-ext2 and .set noloongson-ext2.
	* testsuite/gas/mips/loongson-ext2.d: New test.
	* testsuite/gas/mips/loongson-ext2.s: New test.
	* testsuite/gas/mips/mips.exp: Run loongson-ext2 test.

include/
	* elf/mips.h (AFL_ASE_LOONGSON_EXT2): New macro.
	(AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_EXT2.
	* opcode/mips.h (ASE_LOONGSON_EXT2): New macro.

opcodes/
	* mips-dis.c (parse_mips_ase_option): Handle -M loongson-ext
	option.
	(print_mips_disassembler_options): Document -M loongson-ext.
	* mips-opc.c (LEXT2): New macro.
	(mips_opcodes): Add cto, ctz, dcto, dctz instructions.
2018-08-29 20:08:58 +08:00
Chenghua Xu bdc6c06e3b [MIPS/GAS] Split Loongson EXT Instructions from loongson3a.
bfd/
	 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
	 isa_ext for infer ABI flags.
	 (print_mips_ases): Add Loongson EXT extension.

binutils/
	 * readelf.c (print_mips_ases): Add Loongson EXT extension.

elfcpp/
	 * mips.h (AFL_ASE_LOONGSON_EXT): New enum.

gas/
	 * NEWS: Mention Loongson EXTensions (EXT) support.
	 * config/tc-mips.c (options): Add OPTION_LOONGSON_EXT and
	 OPTION_NO_LOONGSON_EXT.
	 (md_longopts): Likewise.
	 (mips_ases): Define availability for EXT.
	 (mips_convert_ase_flags): Map ASE_LOONGSON_EXT to
	 AFL_ASE_LOONGSON_EXT.
	 (mips_cpu_info_table): Add ASE_LOONGSON_EXT for loongson3a.
	 (md_show_usage): Add help for -mloongson-ext and
	 -mno-loongson-ext.
	 * doc/as.texi: Document -mloongson-ext, -mno-loongson-ext.
	 * doc/c-mips.texi: Document -mloongson-ext, -mno-loongson-ext,
	 .set loongson-ext and .set noloongson-ext.
	 * testsuite/gas/mips/loongson-mmi.d: Add ASE flag.

include/
	 * elf/mips.h (AFL_ASE_LOONGSON_EXT): New macro.
	 (AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_EXT.
	 * opcode/mips.h (ASE_LOONGSON_EXT): New macro.

opcodes/
	 * mips-dis.c (mips_arch_choices): Add EXT to loongson3a
	 descriptors.
	 (parse_mips_ase_option): Handle -M loongson-ext option.
	 (print_mips_disassembler_options): Document -M loongson-ext.
	 * mips-opc.c (IL3A): Delete.
	 * mips-opc.c (LEXT): New macro.
	 (mips_opcodes): Replace IL2F|IL3A marking with LEXT for EXT
	 instructions.
2018-08-29 19:57:39 +08:00
Chenghua Xu 716c08de28 [MIPS/GAS] Split Loongson CAM Instructions from loongson3a
bfd/
	* elfxx-mips.c (print_mips_ases): Add CAM extension.

binutils/
	* readelf.c (print_mips_ases): Add CAM extension.

gas/
	* NEWS: Mention Loongson Content Address Memory (CAM)
	support.
	* config/tc-mips.c (options): Add OPTION_LOONGSON_CAM and
	OPTION_NO_LOONGSON_CAM.
	(md_longopts): Likewise.
	(mips_ases): Define availability for CAM.
	(mips_convert_ase_flags): Map ASE_LOONGSON_CAM to
	AFL_ASE_LOONGSON_CAM.
	(mips_cpu_info_table): Add ASE_LOONGSON_CAM for loongson3a.
	(md_show_usage): Add help for -mloongson-cam and
	-mno-loongson-cam.
	* doc/as.texi: Document -mloongson-cam, -mno-loongson-cam.
	* doc/c-mips.texi: Document -mloongson-cam, -mno-loongson-cam,
	.set loongson-cam and .set noloongson-cam.
	* testsuite/gas/mips/loongson-3a-2.d: Move cam test to ...
	* testsuite/gas/mips/loongson-cam.d: Here.  Add ISA/ASE
	flag verification.
	* testsuite/gas/mips/loongson-3a-2.s: Move cam test to ...
	* testsuite/gas/mips/loongson-cam.s: Here.
	* testsuite/gas/mips/loongson-3a-mmi.d: Add ASE flag.
	* testsuite/gas/mips/mips.exp: Run loongson-cam test.

include/
	* elf/mips.h (AFL_ASE_LOONGSON_CAM): New macro.
	(AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_CAM.
	* opcode/mips.h (ASE_LOONGSON_CAM): New macro.

opcodes/
	* mips-dis.c (mips_arch_choices): Add CAM to loongson3a
	descriptors.
	(parse_mips_ase_option): Handle -M loongson-cam option.
	(print_mips_disassembler_options): Document -M loongson-cam.
	* mips-opc.c (LCAM): New macro.
	(mips_opcodes): Replace IL2F|IL3A marking with LCAM for CAM
	instructions.
2018-08-29 19:33:09 +08:00
H.J. Lu 90c745dc54 x86: Don't mask out the GNU_PROPERTY_X86_UINT32_VALID bit
Since only the GNU_PROPERTY_X86_UINT32_VALID bit may be set in data-only
relocatable objects which don't contain any instructions, linker
shouldn't mask out the GNU_PROPERTY_X86_UINT32_VALID bit when merging
GNU_PROPERTY_X86_XXX bits.  Otherwise, linker output doesn't contain
GNU_PROPERTY_X86_XXX property with any data-only relocatable inputs.
This patch keeps the GNU_PROPERTY_X86_UINT32_VALID bit and updates
readelf to print "<None>" if GNU_PROPERTY_X86_XXX property only has
the GNU_PROPERTY_X86_UINT32_VALID bit.

bfd/

	* elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
	out the GNU_PROPERTY_X86_UINT32_VALID bit.

binutils/

	* readelf.c (decode_x86_isa): Print <None> if bitmask only
	contains the GNU_PROPERTY_X86_UINT32_VALID bit.
	(decode_x86_feature_1): Likewise.
	(decode_x86_feature_2): Likewise.
	(print_gnu_property_note): Don't mask out the
	GNU_PROPERTY_X86_UINT32_VALID bit.
	* testsuite/binutils-all/i386/pr21231b.d: Updated.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.

gas/

	* testsuite/gas/i386/i386.exp: Run property-1 and
	x86-64-property-1.
	* testsuite/gas/i386/property-1.d: New file.
	* testsuite/gas/i386/property-1.s: Likewise.
	* testsuite/gas/i386/x86-64-property-1.d: Likewise.

ld/

	* testsuite/ld-i386/i386.exp: Run property-x86-5.
	* testsuite/ld-i386/property-x86-5.d: New file.
	* testsuite/ld-x86-64/property-x86-5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-5a.s: Likewise.
	* testsuite/ld-x86-64/property-x86-5b.s: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run property-x86-5 and
	property-x86-5-x32.
2018-08-27 15:42:14 -07:00
Jim Wilson bfb218e3e4 RISC-V: Reject empty rouding mode and fence operand.
gas/
	2018-08-23  Kito Cheng  <kito@andestech.com>
	* config/tc-riscv.c (arg_lookup): Checking
	length before look up.
	* testsuite/gas/riscv/fence-fail.d: New file.
	* testsuite/gas/riscv/fence-fail.l: Likewise.
	* testsuite/gas/riscv/fence-fail.s: Likewise.
	* testsuite/gas/riscv/rouding-fail.d: Likewise.
	* testsuite/gas/riscv/rouding-fail.l: Likewise.
	* testsuite/gas/riscv/rouding-fail.s: Likewise.
2018-08-23 13:26:48 -07:00
H.J. Lu 7dd36a6f1c Prune BFD warnings for unknown GNU properties
When glibc is enabled with the new GNU_PROPERTY_X86_XXX bits:

https://groups.google.com/forum/#!topic/x86-64-abi/-D05GQ3kWrA

BFD will issue an unknown GNU property warning like

warning: tmpdir/ld1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001

and ignore such GNU properties.  This patch adds prune_warnings_extra to
prune such warnings on release branches and updates prune_warnings to
call prune_warnings_extra.

binutils/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.
	* testsuite/binutils-all/objcopy.exp (strip_test): Call
	prune_warnings to prune BFD output.
	(strip_test_with_saving_a_symbol): Likewise.
	(objcopy_test_without_global_symbol): Likewise.
	* testsuite/lib/binutils-common.exp (prune_warnings_extra):
	New proc.
	(prune_warnings): Likewise.

gas/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.

ld/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.
	* testsuite/ld-bootstrap/bootstrap.exp: Call prune_warnings to
	prune BFD output.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/lib/ld-lib.exp (prune_warnings): Removed.
	* testsuite/ld-elf/shared.exp: Allow "\n" in linker warnings.
2018-08-23 06:12:50 -07:00
Nick Clifton d000b7630e Fix typo in changelog entry for handling of undocumnented Z80 SLI instruction. 2018-08-22 09:58:32 +01:00
Alan Modra 86b9fea102 Re: Pack reloc_howto_struct
Fix fallout when using gcc-4.

	* dw2gencfi.c (emit_expr_encoded, output_fde): Warning fixes.
2018-08-22 15:38:37 +09:30
Arnold Metselaar 6efa941c38 Fix handling of undocumented SLL instruction for the Z80 target.
* config/tc-z80.c: Correct treatment of undocumented instruction
	sli/sll.
	(emit_mr): Add argument unportable.
	(emit_bit): Adapt call to emit_mr.
	(emit_mr_z80): New function.
	(emit_mr_unportable): New function.
	(instab[]): Replace emit_mr with emit_mr_z80 or emit_mr_unportable
	as appropriate.
2018-08-21 15:50:49 +01:00
Andreas Schwab 9dcbfff1e0 Fix invalid strcpy on unterminated buffer
* read.c (do_repeat_with_expander): Use memmove instead of strcpy
on unterminated string buffer.
2018-08-21 10:34:02 +02:00
Alan Modra 9cf7e5687f Use operand->extract to provide defaults for optional PowerPC operands
Most optional operands to powerpc instructions use a default value of
zero, but there are a few exceptions.  Those have been handled by
PPC_OPERAND_OPTIONAL_VALUE and an entry in the powerpc_operands table
for the default value, smuggled in the shift field.  This patch
changes that to using the operand extract function to provide non-zero
defaults.

I've also moved the code determining whether optional operands are
provided or omitted, to the point the first optional operand is seen,
and allowed for the possibility of optional base register operands
in a future patch.

The patch does change the error you get on invalid assembly like

  ld 3,4

You'll now see "missing operand" rather than
"syntax error; end of line, expected `('".

gas/
	* config/tc-ppc.c (md_assemble): Delay counting of optional
	operands until one is encountered.  Allow for the possibility
	of optional base regs, ie. PPC_OPERAND_PARENS.  Call
	ppc_optional_operand_value with extra args.
include/
	* opcode/ppc.h (struct powerpc_operand): Correct "insert" comment.
	Mention use of "extract" function to provide default value.
	(PPC_OPERAND_OPTIONAL_VALUE): Delete.
	(ppc_optional_operand_value): Rewrite to use extract function.
opcodes/
	* ppc-dis.c (operand_value_powerpc): Init "invalid".
	(skip_optional_operands): Count optional operands, and update
	ppc_optional_operand_value call.
	* ppc-opc.c (extract_dxdn): Remove ATTRIBUTE_UNUSED from used arg.
	(extract_vlensi): Likewise.
	(extract_fxm): Return default value for missing optional operand.
	(extract_ls, extract_raq, extract_tbr): Likewise.
	(insert_sxl, extract_sxl): New functions.
	(insert_esync, extract_esync): Remove Power9 handling and simplify.
	(powerpc_operands <FXM4, TBR>): Delete PPC_OPERAND_OPTIONAL_VALUE
	flag and extra entry.
	(powerpc_operands <SXL>): Likewise, and use insert_sxl and
	extract_sxl.
2018-08-21 16:05:36 +09:30
Alan Modra 08a8fe2ffd Fix s12z test regexps
Fixes
ERROR: tcl error sourcing .../gas/testsuite/gas/s12z/s12z.exp.
ERROR: couldn't compile regular expression pattern: quantifier operand invalid

run_dump_test expected output lines are regexps.

	* testsuite/gas/s12z/bit-manip-invalid.d: Correct regexps.
2018-08-21 14:59:53 +09:30
Alan Modra d203b41ac7 Tidy bit twiddling
* sh-opc.h (MASK): Simplify.
2018-08-20 09:54:20 +09:30
John Darrington f41078422a Opcodes: (BRCLR / BRSET) Disassemble reserved codes instead of aborting.
Bit manipulation instructions which are not normally generated by the
assembler, should nevertheless be decoded by the disassembler.

opcodes/
	* s12z-dis.c: BM_RESERVED1 to behave like BM_OPR_REG, and
	BM_RESERVED0 like BM_REG_IMM.
2018-08-18 07:50:57 +02:00
John Darrington 7ba3ba91a3 S12Z: Move opcode header to public include directory.
opcodes/
        * s12z.h: Delete.
	* s12z-dis.c: Adjust path of included file.

include/
        * opcode/s12z.h: New file.

gas/
	* config/tc-s12z.c: Adjust path of included file.
2018-08-18 07:50:03 +02:00
H.J. Lu 1bc60e5624 x86-64: Display eiz for address with the addr32 prefix
In 64-bit mode, display eiz for address with the addr32 prefix and without
base nor index registers.  For

	mov -0xccddef(,%eiz,), %rax

disassembler now displays:

	67 48 8b 04 25 11 22 33 ff 	mov -0xccddef(,%eiz,1),%rax

instead of

	67 48 8b 04 25 11 22 33 ff 	addr32 mov 0xffffffffff332211,%rax

gas/

	* testsuite/gas/i386/evex-no-scale-64.d: Updated.
	* testsuite/gas/i386/x86-64-addr32-intel.d: Likewise.
	* testsuite/gas/i386/x86-64-addr32.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-addr32-intel.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-addr32.d: Likewise.
	* testsuite/gas/i386/x86-64-addr32.s: Add %eiz tests.

opcodes/

	* i386-dis.c (OP_E_memory): In 64-bit mode, display eiz for
	address with the addr32 prefix and without base nor index
	registers.
2018-08-14 09:56:00 -07:00
Robert Yang 2a50366ded When the assembler reports that the input and output are the same, report the file names involved, in order to help debugging. Also do not equate two files are the same if the have the same inode value but reside on different file systems.
* as.c (main): Improve check for input file matching output file.
2018-08-14 12:22:35 +01:00
H.J. Lu d871f3f483 x86: Add CpuCMOV and CpuFXSR
There are separate CPUID feature bits for fxsave/fxrstor and cmovCC
instructions.  This patch adds CpuCMOV and CpuFXSR to replace Cpu686
on corresponding instructions.

gas/

	* config/tc-i386.c (cpu_arch): Add .cmov and .fxsr.
	(cpu_noarch): Add nocmov and nofxsr.
	* doc/c-i386.texi: Document cmov and fxsr.

opcodes/

	* i386-gen.c (cpu_flag_init): Add CpuCMOV and CpuFXSR to
	CPU_I686_FLAGS.  Add CPU_CMOV_FLAGS, CPU_FXSR_FLAGS,
	CPU_ANY_CMOV_FLAGS and CPU_ANY_FXSR_FLAGS.
	(cpu_flags): Add CpuCMOV and CpuFXSR.
	* i386-opc.tbl: Replace Cpu686 with CpuFXSR on fxsave, fxsave64,
	fxrstor and fxrstor64.  Replace Cpu686 with CpuCMOV on cmovCC.
	* i386-init.h: Regenerated.
	* i386-tbl.h: Likewise.
2018-08-11 14:37:32 -07:00
H.J. Lu d7f449c026 x86: Don't display --32/--64/--x32 without BFD64
For 32-bit x86 assembler, --64 and --x32 are unsupported if BFD64 is
undefined.  Even if BFD64 is defined, --64 and --x32 still may not be
supported if x86-64 support isn't compiled in:

[hjl@gnu-hsw-1 gas]$ ./as-new --64 -o x.o x.s
Assembler messages:
Fatal error: no compiled in support for x86_64
[hjl@gnu-hsw-1 gas]$ ./as-new --x32 -o x.o x.s
Assembler messages:
Fatal error: no compiled in support for 32bit x86_64
[hjl@gnu-hsw-1 gas]$

This patch removes --32/--64/--x32 from md_show_usage if BFD64 is
undefined and runs code64-inval only if BFD64 is undefined.

	* config/tc-i386.c (md_show_usage): Don't display --32/--64/--x32
	if BFD64 is undefined.
	* testsuite/gas/i386/i386.exp (gas_bfd64_check): New.
	Run code64-inval if gas_bfd64_check fails.
2018-08-10 11:03:50 -07:00
H.J. Lu 19449d7c67 x86: Replace evex-no-scale.s with evex-no-scale-[32|64].s
.if is_64bit
	vmovaps	-1024(%rip), %zmm0
	vmovaps	64(,%rax), %zmm0
	vmovaps	64(,%riz), %zmm0
.endif

doesn't with i686-elf cross binutils on 64-bit hosts:

evex-no-scale.s: Assembler messages:
evex-no-scale.s:10: Error: bad register name `%rip)'
evex-no-scale.s:11: Error: bad register name `%rax)'
evex-no-scale.s:12: Error: bad register name `%riz)'

This patch replaces evex-no-scale.s with evex-no-scale-32.s and
evex-no-scale-64.s.

	* testsuite/gas/i386/evex-no-scale-32.d: Don't use
	evex-no-scale.s.
	* testsuite/gas/i386/evex-no-scale-64.d: Likewise.
	* testsuite/gas/i386/evex-no-scale-32.s: New file.
	* testsuite/gas/i386/evex-no-scale-64.s: Likewise.
	* testsuite/gas/i386/evex-no-scale.s: Removed.
2018-08-10 10:23:11 -07:00
H.J. Lu 3a53fb12c8 as --help: Display default option for --elf-stt-common=
* as.c (show_usage): Display default option for --elf-stt-common=.
2018-08-09 09:57:11 -07:00
H.J. Lu 7c5c05effd x86: Display default x86-specific options for "as --help"
* config/tc-i386.c (md_show_usage): Display default options.
2018-08-09 09:52:43 -07:00
James Patrick Conlon 8f9ea98beb Correct the parsing of derferred register addressing in the PDP11 assembler.
PR 23481
	* config/tc-pdp11.c (parse_op_noreg): Check for deferred register
	addressing before assuming non-deferred addressing.
	* testsuite/gas/pdp11/pr23481.s: New test source file.
	* testsuite/gas/pdp11/pr23481.d: New test driver file.
	* testsuite/gas/pdp11/pdp11.exp: Run the new test.
2018-08-07 08:34:08 +01:00
claziss 63741043bd [ARC] Check if an input asm file is rf16 compliant
Check if an input asm file is rf16 compliant; if not, and the tag says
otherwise, fix the tag and emit a warning.

gas/
2017-09-20  Claudiu Zissulescu <claziss@synopsys.com>

	* config/tc-arc.c (rf16_only): New static variable.
	(autodetect_attributes): Check if we are rf16 compliant.
	(arc_set_public_attributes): Fix and emit the warning is required.
	* testsuite/gas/arc/attr-rf16.d: New file.
	* testsuite/gas/arc/attr-rf16.err: Likewise.
	* testsuite/gas/arc/attr-rf16.s: Likewise.
2018-08-06 16:41:32 +03:00
claziss db1e1b45b4 [ARC] Add Tag_ARC_ATR_version.
Add a new tag (Tag_ARC_ATR_version) used to indicate if current
attributes are interpreted in GNU way. This attribute is used by
Synopsys custom compiler to correctly identify and interpret the
object attributes section as generated by GNU tools.

gas/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* config/tc-arc.c (arc_set_public_attributes): Add
	Tag_ARC_ATR_version.
	(arc_convert_symbolic_attribute): Likewise.
	* testsuite/gas/arc/attr-arc600.d: Update test.
	* testsuite/gas/arc/attr-arc600_mul32x16.d: Likewise.
	* testsuite/gas/arc/attr-arc600_norm.d: Likewise.
	* testsuite/gas/arc/attr-arc601.d: Likewise.
	* testsuite/gas/arc/attr-arc601_mul32x16.d: Likewise.
	* testsuite/gas/arc/attr-arc601_mul64.d: Likewise.
	* testsuite/gas/arc/attr-arc601_norm.d: Likewise.
	* testsuite/gas/arc/attr-arc700.d: Likewise.
	* testsuite/gas/arc/attr-arcem.d: Likewise.
	* testsuite/gas/arc/attr-archs.d: Likewise.
	* testsuite/gas/arc/attr-autodetect-1.d: Likewise.
	* testsuite/gas/arc/attr-cpu-a601.d: Likewise.
	* testsuite/gas/arc/attr-cpu-a700.d: Likewise.
	* testsuite/gas/arc/attr-cpu-em.d: Likewise.
	* testsuite/gas/arc/attr-cpu-hs.d: Likewise.
	* testsuite/gas/arc/attr-em.d: Likewise.
	* testsuite/gas/arc/attr-em4.d: Likewise.
	* testsuite/gas/arc/attr-em4_dmips.d: Likewise.
	* testsuite/gas/arc/attr-em4_fpuda.d: Likewise.
	* testsuite/gas/arc/attr-em4_fpus.d: Likewise.
	* testsuite/gas/arc/attr-hs.d: Likewise.
	* testsuite/gas/arc/attr-hs34.d: Likewise.
	* testsuite/gas/arc/attr-hs38.d: Likewise.
	* testsuite/gas/arc/attr-hs38_linux.d: Likewise.
	* testsuite/gas/arc/attr-mul64.d: Likewise.
	* testsuite/gas/arc/attr-name.d: Likewise.
	* testsuite/gas/arc/attr-nps400.d: Likewise.
	* testsuite/gas/arc/attr-override-mcpu.d: Likewise.
	* testsuite/gas/arc/attr-quarkse_em.d: Likewise.

bfd/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* elf32-arc.c (arc_elf_merge_attributes): Handle
	Tag_ARC_ATR_version.

binutils/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* readelf.c (display_arc_attribute): Print Tag_ARC_ATR_version.

include/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* elf/arc.h (Tag_ARC_ATR_version): New tag.

ld/
2017-08-02  Claudiu Zissulescu <claziss@synopsys.com>

	* testsuite/ld-arc/attr-merge-0.d: Update test.
	* testsuite/ld-arc/attr-merge-1.d: Likewise.
	* testsuite/ld-arc/attr-merge-2.d: Likewise.
	* testsuite/ld-arc/attr-merge-3.d: Likewise.
	* testsuite/ld-arc/attr-merge-5.d: Likewise.
2018-08-06 16:41:32 +03:00
claziss b6523c37fb [ARC] Update handling AUX-registers.
Update aux-registers data-base, and accept aux-registers names with
upper/lowercase names.

opcode/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* arc-regs.h: Update aux-registers.

gas/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/tc-arc.c (find_opcode_match): Accept uppercase aux-regs
	names.
	* testsuite/gas/arc/ld2.d: Update test.
	* testsuite/gas/arc/taux.d: Likewise.
	* testsuite/gas/arc/taux.s: Likewise.

include/
2017-07-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* opcode/arc.h (ARC_OPCODE_ARCV1): Define.
2018-08-06 16:41:32 +03:00
Jan Beulich e968fc9b63 x86: fold RegEip/RegRip and RegEiz/RegRiz
This allows to simplify the code in a number of places.
2018-08-06 08:34:36 +02:00
H.J. Lu 99c2d522f7 x86: Update assembler tests for non-ELF targets
evex-no-scale.s has ELF directive:

.section .probe, "", @progbits

and non-ELF targets may pad text sections.

	* testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
	evex-no-scale-64 only for ELF targets.
	* testsuite/gas/i386/prefix32.s: Append ".p2align 4,0".
	* testsuite/gas/i386/prefix64.s: Likewise.
	* testsuite/gas/i386/prefix32.l: Updated.
	* testsuite/gas/i386/prefix64.l: Likewise.
2018-08-05 10:05:52 -07:00
Alan Modra 05d0e962f0 R_PPC64_REL24_NOTOC support
R_PPC64_REL24_NOTOC is used on calls like "bl foo@notoc" to tell the
linker that linkage stubs for PLT calls or long branches can't use r2
for pic addressing.  Instead, new stubs that generate pc-relative
addresses are used.  One complication is that pc-relative offsets to
the PLT may need to be 64-bit in large programs, in contrast to the
toc-relative addressing used by older PLT linkage stubs where a 32-bit
offset is sufficient until the PLT itself exceeds 2G in size.

.eh_frame info to cover the _notoc stubs is yet to be implemented.

bfd/
	* elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
	(ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
	(SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
	(ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
	(ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
	(ppc_stub_type): Add ppc_stub_long_branch_notoc,
	ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
	ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
	ppc_stub_plt_call_both.
	(is_branch_reloc): Add R_PPC64_REL24_NOTOC.
	(build_offset, size_offset): New functions.
	(plt_stub_size): Support plt_call_notoc and plt_call_both.
	(ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
	(toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
	(ppc64_elf_size_stubs): Likewise, and new stubs.
	(ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
	* reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
gas/
	* config/tc-ppc.c (ppc_elf_suffix): Support @notoc.
	(ppc_force_relocation, ppc_fix_adjustable): Handle REL24_NOTOC.
ld/
	* testsuite/ld-powerpc/ext.d,
	* testsuite/ld-powerpc/ext.s,
	* testsuite/ld-powerpc/ext.lnk,
	* testsuite/ld-powerpc/notoc.d,
	* testsuite/ld-powerpc/notoc.s: New tests.
	* testsuite/ld-powerpc/powerpc.exp: Run them.
2018-08-05 12:11:51 +09:30
Dimitar Dimitrov 2688aab226 Update PRU assembler to corect hardware register numbering for DWARF.
A small rework of the PRU GCC port exposed that CIE data alignment is
erroneously set to 4 for PRU in GAS. In fact PRU stack must be aligned to 1.
Set the macro to -1, to allow output from GCC to be assembled without errors.

Also, while at it, set DWARF2 HW register numbering to follow latest

	* config/tc-pru.c (pru_regname_to_dw2regnum): Return the starting HW
	byte-register number.
	(pru_frame_initial_instructions): Use byte-numbering for FP index.
	* config/tc-pru.h (DWARF2_DEFAULT_RETURN_COLUMN): Use number from
	latest GCC.
	(DWARF2_CIE_DATA_ALIGNMENT): Set to -1.
2018-08-03 10:02:39 +01:00
Jan Beulich c48dadc9a8 x86: drop "mem" operand type attribute
No template specifies this bit, so there's no point recording it in the
templates. Use a flags[] bit instead.
2018-08-03 09:30:02 +02:00
James Patrick Conlon 3cf2b6691c Fix bug in PDP11 assembler when handling a JSr instruction with deferred auto increment.
PR 14480
	* config/tc-pdp11.c (parse_op_noreg): Check for and handle auto
	increment deferred.
	* testsuite/gas/pdp11/pr14480.d: New test driver file.
	* testsuite/gas/pdp11/pr14480.s: New test source file file.
	* testsuite/gas/pdp11/pdp11.exp: Run the new test.
2018-08-01 15:14:46 +01:00
Nick Clifton f03fb29221 Fix compile time warning problem with gcc 8 and the NS32K assembler sources.
* config/tc-ns32k.c (addr_mode): Replace "Drop through" comment
	with "Fall through" so that it will be recognised by gcc's switch
	statment error checker.
2018-08-01 14:36:50 +01:00
Alan Modra cb86a42aba csky regen
bfd/
	* po/SRC-POTFILES.in: Regenerate.
gas/
	* po/POTFILES.in: Regenerate.
ld/
	* po/BLD-POTFILES.in: Regenerate.
opcodes/
	* po/POTFILES.in: Regenerate.
2018-08-01 10:32:56 +09:30
Jan Beulich 1424ad8677 x86: also optimize KXOR{D,Q} and KANDN{D,Q}
These can be converted to 2-byte VEX encoding when both source registers
are the same, by using KXORW / KANDNW as replacement.
2018-07-31 10:58:05 +02:00
Jan Beulich ae2387feae x86: fold various AVX512 templates with so far differing Masking attributes
There's no insn allowing ZEROING_MASKING alone. Re-purpose its value for
handling the not uncommon case of insns allowing either form of masking
with register operands, but only merging masking with a memory operand.
2018-07-31 10:57:09 +02:00
Jan Beulich fa77b93ab7 x86: add more exhaustive tests for invalid AVX512 zeroing-masking
Before changing how things get handled, install a full set of tests,
such that it can be demonstrated that the subsequent change doesn't
break things.
2018-07-31 10:56:09 +02:00
Jan Beulich 6ff00b5e12 x86/Intel: correct permitted operand sizes for AVX512 scatter/gather
AVX gather insns correctly allow the element size to be specified rather
than the full vector size. Make AVX512 ones match.
2018-07-31 10:55:17 +02:00
Jan Beulich 7a8655d2bb x86: don't abort() upon DATA16 prefix on (E)VEX encoded insn
Instead of hitting the abort() in output_insn() (commented by "There
should be no other prefixes for instructions with VEX prefix"), report
a proper diagnostic instead, just like we do e.g. for invalid REP
prefixes.
2018-07-31 10:54:05 +02:00
Jan Beulich e951d5ca3d x86: drop CpuVREX
It is fully redundant with CpuAVX512F.
2018-07-31 10:52:37 +02:00
Jan Beulich 629cfaf1b0 x86: don't mistakenly scale non-8-bit displacements
In commit b5014f7af2 I've removed (instead of replaced) a conditional,
resulting in addressing forms not allowing 8-bit displacements to now
get their displacements scaled under certain circumstances. Re-add the
missing conditional.
2018-07-30 17:25:05 +02:00
Andrew Jenner b8891f8d62 Add support for the C_SKY series of processors.
This patch series is a new binutils port for C-SKY processors, including support for both the V1 and V2 processor variants.  V1 is derived from the MCore architecture while V2 is substantially different, with mixed 16- and 32-bit instructions, a larger register set, a different (but overlapping) ABI, etc.  There is support for bare-metal ELF targets and Linux with both glibc and uClibc.

This code is being contributed jointly by C-SKY Microsystems and Mentor Graphics.  C-SKY is responsible for the technical content and has proposed Lifang Xia and Yunhai Shang as port maintainers.  (Note that C-SKY does have a corporate copyright assignment on file with the FSF.) Mentor Graphics' role has been cleaning up the code, adding documentation and additional test cases, etc, to address issues we anticipated reviewers would complain about.

bfd     * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
        (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
        * Makefile.in: Regenerated.
        * archures.c (enum bfd_architecture): Add bfd_arch_csky and
        related bfd_mach defines.
        (bfd_csky_arch): Declare.
        (bfd_archures_list): Add C-SKY.
        * bfd-in.h (elf32_csky_build_stubs): Declare.
        (elf32_csky_size_stubs): Declare.
        (elf32_csky_next_input_section: Declare.
        (elf32_csky_setup_section_lists): Declare.
        * bfd-in2.h: Regenerated.
        * config.bfd: Add C-SKY.
        * configure.ac: Likewise.
        * configure: Regenerated.
        * cpu-csky.c: New file.
        * elf-bfd.h (enum elf_target_id): Add C-SKY.
        * elf32-csky.c: New file.
        * libbfd.h: Regenerated.
        * reloc.c: Add C-SKY relocations.
        * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
        (_bfd_target_vector): Add C-SKY target vector entries.

binutils* readelf.c: Include elf/csky.h.
        (guess_is_rela): Handle EM_CSKY.
        (dump_relocations): Likewise.
        (get_machine_name): Likewise.
        (is_32bit_abs_reloc): Likewise.

include  * dis-asm.h (csky_symbol_is_valid): Declare.
         * opcode/csky.h: New file.

opcodes  * Makefile.am (TARGET_LIBOPCODES_CFILES): Add csky-dis.c.
         * Makefile.in: Regenerated.
         * configure.ac: Add C-SKY.
         * configure: Regenerated.
         * csky-dis.c: New file.
         * csky-opc.h: New file.
         * disassemble.c (ARCH_csky): Define.
         (disassembler, disassemble_init_for_target): Add case for ARCH_csky.
         * disassemble.h (print_insn_csky, csky_get_disassembler): Declare.

gas      * Makefile.am (TARGET_CPU_CFILES): Add entry for C-SKY.
         (TARGET_CPU_HFILES, TARGET_ENV_HFILES): Likewise.
         * Makefile.in: Regenerated.
         * config/tc-csky.c: New file.
         * config/tc-csky.h: New file.
         * config/te-csky_abiv1.h: New file.
         * config/te-csky_abiv1_linux.h: New file.
         * config/te-csky_abiv2.h: New file.
         * config/te-csky_abiv2_linux.h: New file.
         * configure.tgt: Add C-SKY.
         * doc/Makefile.am (CPU_DOCS): Add entry for C-SKY.
         * doc/Makefile.in: Regenerated.
         * doc/all.texi: Set CSKY feature.
         * doc/as.texi (Overview): Add C-SKY options.
         (Machine Dependencies): Likewise.
         * doc/c-csky.texi: New file.
         * testsuite/gas/csky/*: New test cases.

ld      * Makefile.am (ALL_EMULATION_SOURCES): Add C-SKY emulations.
        (ecskyelf.c, ecskyelf_linux.c): New rules.
        * Makefile.in: Regenerated.
        * configure.tgt: Add C-SKY.
        * emulparams/cskyelf.sh: New file.
        * emulparams/cskyelf_linux.sh: New file.
        * emultempl/cskyelf.em: New file.
        * gen-doc.texi: Add C-SKY.
        * ld.texi: Likewise.
        (Options specific to C-SKY targets): New section.
        * testsuite/ld-csky/*: New tests.
2018-07-30 12:24:14 +01:00
John David Anglin 29e6f4745e Fix unwind offset for start_symbol.
* config/tc-hppa.c: Include "struc-symbol.h".
	(pa_build_unwind_subspace): Use call_info->start_symbol->sy_frag
	instead of frag_now for local symbol replacement.
2018-07-29 12:51:23 -04:00
Jim Wilson d19969ffbf RISC-V: Fix gas configure support for riscv*-*-*.
gas/
	* configure.tgt (riscv*): Accept as alias for riscv32*.
2018-07-27 14:35:29 -07:00
H.J. Lu 1286ab7881 x86: Check for more than 2 memory references
For

movsd (%esi), %ss:(%edi), %ss:(%eax)

we got

[hjl@gnu-tools-1 tmp]$ as -o x.o x.s
x.s: Assembler messages:
x.s:1: Error: too many memory references for `movsd'
munmap_chunk(): invalid pointer
x.s:1: Internal error (Aborted).
Please report this bug.
[hjl@gnu-tools-1 tmp]$

struct _i386_insn has

const seg_entry *seg[2];

3 memory references will overflow the seg array.  We should issue an
error if there are more than 2 memory references.

	PR gas/23453
	* config/tc-i386.c (parse_operands): Check for more than 2
	memory references.
	* testsuite/gas/i386/inval.s: Add a movsd test with 3 memory
	references.
	* testsuite/gas/i386/x86-64-inval.s: Likewise.
	* testsuite/gas/i386/inval.l: Updated.
	* testsuite/gas/i386/x86-64-inval.l: Likewise.
2018-07-27 06:35:09 -07:00
H.J. Lu 1f75763aa1 x86: Initialize broadcast_op.bytes to 0
* config/tc-i386.c (check_VecOperations): Initialize
	broadcast_op.bytes to 0.
2018-07-26 08:49:12 -07:00
Alex Chadwick fa758a7046 PowerPC Improve support for Gekko & Broadway
This is a relatively straightforward patch to improve support for the
IBM Gekko and IBM Broadway processors.  Broadway is functionally
equivalent to the IBM 750CL, while Gekko's functionality is a subset
of theirs.  The patch simplifies this reality and adds -mgekko and
-mbroadway as aliases for -m750cl.  I didn't feel it was worth wasting
a PPC_OPCODE_* bit to differentiate Gekko.  The patch adds a number of
simplified mnemonics for special purpose register access.  Notably,
Broadway adds 4 additional IBAT and DBAT registers but these are not
assigned sequential SPR numbers.

gas/
	* config/tc-ppc.c (md_show_usage): Add -mgekko and -mbroadway.
	* doc/as.texi (Target PowerPC options): Add -mgekko and -mbroadway.
	* doc/c-ppc.texi (PowerPC-Opts): Likewise.
	* testsuite/gas/ppc/broadway.d,
	* testsuite/gas/ppc/broadway.s: New test for broadway.
	* testsuite/gas/ppc/ppc.exp: Run new test.
include/
	* opcode/ppc.h (PPC_OPCODE_750): Adjust comment.
opcodes/
	* ppc-dis.c (ppc_opts): Add -mgekko and -mbroadway.
	(powerpc_init_dialect): Handle bfd_mach_ppc_750.
	* ppc-opc.c (insert_sprbat, extract_sprbat): New functions to
	support disjointed BAT.
	(powerpc_operands): Allow extra bit in SPRBAT_MASK.  Add SPRGQR.
	(XSPRGQR_MASK, GEKKO, BROADWAY): Define.
	(powerpc_opcodes): Add 750cl extended mnemonics for spr access.
2018-07-26 17:42:47 +09:30
Alan Modra 33cb30a1f9 Implement PowerPC64 .localentry for value 1
This adds support for ".localentry 1", a new st_other
STO_PPC64_LOCAL_MASK encoding that signifies a function with a single
entry point like ".localentry 0", but unlike a ".localentry 0"
function does not preserve r2.

include/
	* elf/ppc64.h: Specify byte offset to local entry for values
	of two to six in STO_PPC64_LOCAL_MASK.  Clarify r2 return
	value for such functions when entering via global entry point.
	Specify meaning of a value of one in STO_PPC64_LOCAL_MASK.
bfd/
	* elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
	for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
gas/
	* config/tc-ppc.c (ppc_elf_localentry): Allow .localentry values
	of 1 and 7 to directly set value into STO_PPC64_LOCAL_MASK bits.
ld/testsuite/
	* ld-powerpc/elfv2.s: Add .localentry f5,1 testcase.
	* ld-powerpc/elfv2exe.d: Update.
	* ld-powerpc/elfv2so.d: Update.
2018-07-26 12:53:50 +09:30
H.J. Lu 4a1b91eabb x86: Expand Broadcast to 3 bits
Expand Broadcast to 3 bits so that the number of bytes to broadcast
can be computed as 1 << (Broadcast - 1).  Use it to simplify x86
assembler.

gas/

	* config/tc-i386.c (Broadcast_Operation): Add bytes.
	(build_evex_prefix): Use i.broadcast->bytes.
	(match_broadcast_size): New function.
	(check_VecOperands): Use the broadcast field to compute the
	number of bytes to broadcast directly.  Set i.broadcast->bytes.
	Use match_broadcast_size.

opcodes/

	* i386-gen.c (adjust_broadcast_modifier): New function.
	(process_i386_opcode_modifier): Add an argument for operands.
	Adjust the Broadcast value based on operands.
	(output_i386_opcode): Pass operand_types to
	process_i386_opcode_modifier.
	(process_i386_opcodes): Pass NULL as operands to
	process_i386_opcode_modifier.
	* i386-opc.h (BYTE_BROADCAST): New.
	(WORD_BROADCAST): Likewise.
	(DWORD_BROADCAST): Likewise.
	(QWORD_BROADCAST): Likewise.
	(i386_opcode_modifier): Expand broadcast to 3 bits.
	* i386-tbl.h: Regenerated.
2018-07-25 15:28:24 -07:00
Thomas Preud'homme 5469110733 Clarify doc for .arch/.cpu
Documentation for .arch and .cpu directives currently says that it
accepts the same name as -march/-mcpu command-line options respectively.
However it only accept the architecture/CPU part of those options: it
does not accept specifying an extension which is done via
.arch_extension. This patch clarifies that the extension is not
accepted.

2018-07-25  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

gas/
	* doc/c-arm.texi (.arch directive): Clarify that name must not include
	an extension.
	(.cpu directive): Likewise.
2018-07-25 14:12:40 +01:00
H.J. Lu 56522fc5af x86: Use unsigned int to iterate through vector operands
Use unsigned int to iterate through multi-length vector operands to avoid
sign-extension.

	* config/tc-i386.c (build_vex_prefix): Use unsigned int to
	iterate through multi-length vector operands.
	(build_evex_prefix): Likewise.
2018-07-24 09:51:08 -07:00
Jan Beulich 4174bfff8a x86-64: correct AVX512F vcvtsi2s{d,s} handling
Just like for their AVX counterparts and CVTSI2S{D,S}, a memory source
here is ambiguous and hence
- in source files should be qualified with a suitable suffix or operand
  size specifier (not doing so is an error in Intel mode, and will gain
  a diagnostic in AT&T mode in the future),
- in disassembly should be properly suffixed (the Intel operand size
  specifiers were emitted correctly already).
2018-07-24 09:46:27 +02:00
H.J. Lu e2b7fbc46d x86: Add a test for missing broadcast
For

	.intel_syntax noprefix
	vcvtps2qq xmm0, DWORD PTR [rax]

we should get

Error: broadcast is needed for operand of such type for `vcvtps2qq'

	* testsuite/gas/i386/inval-avx512f.s: Add a test for missing
	broadcast.
	* testsuite/gas/i386/x86-64-inval-avx512f.s: Likewise.
	* testsuite/gas/i386/inval-avx512f.l: Updated.
	* testsuite/gas/i386/x86-64-inval-avx512f.l: Likewise.
2018-07-23 06:32:20 -07:00
H.J. Lu c265869848 x86: Remove broadcast_not_on_src_operand
Remove broadcast_not_on_src_operand since it is unused.

	* config/tc-i386.c (i386_error): Remove
	broadcast_not_on_src_operand.
	(match_template): Likewse.
2018-07-23 05:43:43 -07:00
Claudiu Zissulescu 04e65276fa [ARC] Fix decoding of w6 signed short immediate.
gas/
  Claudiu Zissulescu  <claziss@synopsys.com>

        * testsuite/gas/arc/st.d: Fix test.

opcodes/
  Claudiu Zissulescu  <claziss@synopsys.com>

        * arc-opc.c (extract_w6): Fix extending the sign.
2018-07-23 11:09:43 +02:00
claziss f02806be1f [ARC] Fix case-sensitivity for extension instructions.
In ARC assembler, we accept case insensitive mnemonics, but this was
not the case for extension instruction, fix it and add a test.

gas/
Claudiu Zissulescu <claziss@synopsys.com>

	* config/tc-arc.c (tokenize_extinsn): Convert to lower case the
	name of extension instructions.
	* testsuite/gas/arc/textinsn_case.d: New file.
	* testsuite/gas/arc/textinsn_case.s: Likewise.
2018-07-23 11:09:43 +02:00
H.J. Lu c7213af9b3 x86: Determine vector length from the last vector operand
Determine VEX/EVEXE vector length from the last multi-length vector
operand.

	* config/tc-i386.c (build_vex_prefix): Determine vector
	length from the last multi-length vector operand.
	(build_evex_prefix): Likewise.
2018-07-22 12:00:39 -07:00
H.J. Lu dd40ce22d0 gas/config/tc-i386.c: Break long line
* config/tc-i386.c (match_simd_size): Break long line.
	(match_mem_size): Likewise.
2018-07-21 10:57:54 -07:00
H.J. Lu 7a54636a02 x86: Rename match_reg_size to match_operand_size
match_reg_size checks size for both memory and register operands.  This
patch renamed match_reg_size to match_operand_size and updated comments
for

commit 3ac21baa84
Author: Jan Beulich <jbeulich@novell.com>
Date:   Mon Jul 16 08:19:21 2018 +0200

    x86: fix operand size checking

which added one argument to match_reg_size, match_simd_size and
match_mem_size.

	* config/tc-i386.c (match_reg_size): Renamed to ...
	(match_operand_size): This.  Update comments.
	(match_simd_size): Update comments.  Replace match_reg_size
	with match_operand_size.
	(match_mem_size): Likewise.
	(operand_size_match): Replace match_reg_size with
	match_operand_size.
2018-07-20 12:55:14 -07:00
Chenghua Xu 8095d2f70e MIPS/GAS: Split Loongson MMI Instructions from loongson2f/3a
The MMI instruction set has been implemented in many Loongson
processors.  There is a lot of software optimized for MMI.  This patch
splits MMI from loongson2f/3a, and adds GAS and disassembler options for
MMI instructions.

2018-07-20  Chenghua Xu  <paul.hua.gm@gmail.com>
            Maciej W. Rozycki  <macro@mips.com>

bfd/
	* elfxx-mips.c (print_mips_ases): Add MMI extension.

binutils/
	* readelf.c (print_mips_ases): Add MMI extension.

gas/
	* NEWS: Mention MultiMedia extensions Instructions (MMI)
	support.
	* config/tc-mips.c (options): Add OPTION_LOONGSON_MMI and
	OPTION_NO_LOONGSON_MMI.
	(md_longopts): Likewise.
	(mips_ases): Define availability for MMI.
	(mips_convert_ase_flags): Map ASE_LOONGSON_MMI to
	AFL_ASE_LOONGSON_MMI.
	(mips_cpu_info_table): Add ASE_LOONGSON_MMI for loongson2f/3a.
	(md_show_usage): Add help for -mloongson-mmi and
	-mno-loongson-mmi.
	* doc/as.texi: Document -mloongson-mmi, -mno-loongson-mmi.
	* doc/c-mips.texi: Document -mloongson-mmi, -mno-loongson-mmi,
	.set loongson-mmi and .set noloongson-mmi.
	* testsuite/gas/mips/loongson-2f.d: Move mmi test to ...
	* testsuite/gas/mips/loongson-2f-mmi.d: Here.  Add ISA/ASE
	flag verification.
	* testsuite/gas/mips/loongson-2f.s: Move mmi test to ...
	* testsuite/gas/mips/loongson-2f-mmi.s: Here.
	* testsuite/gas/mips/loongson-3a.d: Move mmi test to ...
	* testsuite/gas/mips/loongson-3a-mmi.d: Here.  Add ISA/ASE
	flag verification.
	* testsuite/gas/mips/loongson-3a.s: Move mmi test to ...
	* testsuite/gas/mips/loongson-3a-mmi.s: Here.
	* testsuite/gas/mips/mips.exp: Run loongson-2f-mmi and
	loongson-3a-mmi tests.

include/
	* elf/mips.h (AFL_ASE_MMI): New macro.
	(AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_MMI.
	* opcode/mips.h (ASE_LOONGSON_MMI): New macro.

opcodes/
	* mips-dis.c (mips_arch_choices): Add MMI to loongson2f and
	loongson3a descriptors.
	(parse_mips_ase_option): Handle -M loongson-mmi option.
	(print_mips_disassembler_options): Document -M loongson-mmi.
	* mips-opc.c (LMMI): New macro.
	(mips_opcodes): Replace IL2F|IL3A marking with LMMI for MMI
	instructions.
2018-07-20 13:21:33 +01:00
Rainer Orth 0458ca4440 Specify architecture for SPARC gas tests
A couple of SPARC gas tests FAIL on Solaris/SPARC (both
sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11):

FAIL: sparc PAUSE
FAIL: sparc CBCOND
FAIL: sparc CFR
FAIL: sparc CRYPTO
FAIL: sparc HPC+VIS3
FAIL: sparc IMA
FAIL: sparc OSA2015 %mwait asr and MWAIT instruction
FAIL: sparc OSA2015 %mcdper asr
FAIL: sparc SPARC5 and VIS4.0
FAIL: OSA2015 crypto instructions
FAIL: SPARC6
FAIL: FPCMPSHL OSA2017 instructions
FAIL: OSA2017 ONADD/ONSUB/ONMUL/ONDIV instructions.
FAIL: OSA2017 RLE instructions
FAIL: sparc64 rdasr
FAIL: sparc64 rdpr
FAIL: sparc64 rdhpr
FAIL: sparc64 wrasr
FAIL: sparc64 wrpr

It turns out there's a common pattern here: failures happen for all
tests that use SPARC ISA extensions beyond sparcv9, e.g. for the sparc
PAUSE test:

regexp_diff match failure
regexp "^   0:  b7 80 40 02     wr  %g1, %g2, %pause$"
line   "   0:   b7 80 40 02     wr  %g1, %g2, %asr27"
[...]
regexp_diff match failure
regexp "^   8:  b7 80 20 08     pause  8$"
line   "   8:   b7 80 20 08     wr  8, %asr27"
[...]

The fix is easy, actually: just as the tests specify the ISA extension
to use as a gas flag, the same needs to be done for objdump.  For the
test above, which has -Av9v, this means passing -msparc:v9v to objdump.
Doing so makes all but two (unrelated; to be reported separately)
failures go away.

This doesn't happen on Linux/SPARC, where gas emits GNU object attributes
matching the hardcare capabilities used.  Since gas doesn't yet implement
Solaris-style object capabilites, the explicit -march is needed, but only
passed on Solaris.

Tested on both sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.

	* testsuite/gas/sparc/sparc.exp (set_tests_arch): New proc.
	Prefix v9c, v9d, v9v, v9m, v9m8 tests with corresponding
	set_tests_arch.
2018-07-20 11:15:57 +02:00
Jan Beulich 625cbd7ac1 x86: fold VFPCLASSP{D,S} templates
These are special because they may not have a register operand to derive
the vector length from, which requires to also deal with the braodcast
case when determining vector length in build_evex_prefix().

Also drop IgnoreSize (and the now redundant size specifiers) from their
suffixed counterparts.
2018-07-19 08:35:38 +02:00
Jan Beulich 8282b7ad0d x86: fold various AVX512BW templates 2018-07-19 08:32:17 +02:00
Jan Beulich 7091c61201 x86: fold various AVX512VL templates into their AVX512F counterparts 2018-07-19 08:29:35 +02:00
Maciej W. Rozycki 972450a72c MIPS/GAS/testsuite: Correct whitespace issues with Loongson tests
Remove CR characters, trailing whitespace and space characters appearing
immediately before a tab character, and replace spaces with tabs, all
across Loongson GAS tests.

	gas/
	* testsuite/gas/mips/loongson-2e.d: Correct whitespace issues.
	* testsuite/gas/mips/loongson-2f.d: Likewise.
	* testsuite/gas/mips/loongson-2f-2.d: Likewise.
	* testsuite/gas/mips/loongson-2f-3.d: Likewise.
	* testsuite/gas/mips/loongson-3a.d: Likewise.
	* testsuite/gas/mips/loongson-3a-2.d: Likewise.
	* testsuite/gas/mips/loongson-2e.s: Likewise.
	* testsuite/gas/mips/loongson-2f.s: Likewise.
	* testsuite/gas/mips/loongson-2f-3.s: Likewise.
	* testsuite/gas/mips/loongson-3a.s: Likewise.
	* testsuite/gas/mips/loongson-3a-2.s: Likewise.
2018-07-18 14:08:37 +01:00
H.J. Lu 11a322db5c x86: Split vcvtps2{,u}qq and vcvttps2{,u}qq
After

commit 1b54b8d7e4
Author: Jan Beulich <jbeulich@novell.com>
Date:   Mon Dec 18 09:36:14 2017 +0100

    x86: fold RegXMM/RegYMM/RegZMM into RegSIMD

    ... qualified by their respective sizes, allowing to drop FirstXmm0 at
    the same time.

folded RegXMM, RegYMM and RegZMM into RegSIMD, it's no longer impossible
to distinguish if Xmmword can represent a memory reference when operand
specification contains SIMD register. For example, template operands
specification like these

RegXMM|...|Xmmword|...

and

RegXMM|...

The Xmmword bitfield is always set by RegXMM which is represented by
"RegSIMD|Xmmword".  This patch splits each of vcvtps2qq, vcvtps2uqq,
vcvttps2qq and vcvttps2uqq into 2 templates: one template only has
RegXMM source operand and the other only has mempry source operand.

gas/

	PR gas/23418
	* testsuite/gas/i386/xmmword.s: Add tests for vcvtps2qq,
	vcvtps2uqq, vcvttps2qq and vcvttps2uqq.
	* testsuite/gas/i386/xmmword.l: Updated.

opcodes/

	PR gas/23418
	* i386-opc.h (Byte): Update comments.
	(Word): Likewise.
	(Dword): Likewise.
	(Fword): Likewise.
	(Qword): Likewise.
	(Tbyte): Likewise.
	(Xmmword): Likewise.
	(Ymmword): Likewise.
	(Zmmword): Likewise.
	* i386-opc.tbl: Split vcvtps2qq, vcvtps2uqq, vcvttps2qq and
	vcvttps2uqq.
	* i386-tbl.h: Regenerated.
2018-07-18 05:33:50 -07:00
Jan Beulich 3ac21baa84 x86: fix operand size checking
Currently mov to/from control, debug, and test register insns accept any
size GPR operand (general pattern: templates with D set and both
operands being registers in distinct register files). This is due to
improper checking of the reverse case, including not informing the
caller whether a straight and/or reverse match was successful.

The helper functions need to be told two indexes: One to index the given
operand types array, and the other to index the template one. The caller
must attempt a further straight match only if the function reported a
straight match (and respectively for reverse matches).
2018-07-16 08:19:21 +02:00
Nick Clifton b84f59efc6 Add a test that relocs are correctly generated for missing build notes.
* testsuite/gas/elf/missing-build-notes.s: New test.  Checks that
	relocs are correctly generated for missing build notes.
	* testsuite/gas/elf/missing-build-notes.d: New file.  Expected
	output from objdump.
	* testsuite/gas/elf/elf.exp: Run the new test.
2018-07-13 15:48:49 +01:00
Nick Clifton 4ef4710f5c Allow bit-patterns in the immediate field of ARM neon mov instructions.
* config/tc-arm.c (do_neon_mov): When converting an integer
	immediate into a floating point value, check that the conversion
	is valid.  Also warn if the immediate is valid as both a floating
	point value and a bit pattern.
	* testsuite/gas/arm/vfp-mov-enc.s: Add instructions that use
	floating point bit patterns.
	* testsuite/gas/arm/vfp-mov-enc.d: Add regexps for the disassembly
	of the new insns.
2018-07-13 11:50:16 +01:00
Nick Clifton cde3679eb5 This patch adds support for the SSBB and PSSBB speculation barrier instructions to the AArch64 assembler and disassembler.
For more details see: https://static.docs.arm.com/ddi0596/a/DDI_0596_ARM_a64_instruction_set_architecture.pdf

opcodes	* aarch64-tbl.h (aarch64_opcode_table): Add entry for
	ssbb and pssbb and update dsb flags to F_HAS_ALIAS.
	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Regenerate.
	* aarch64-opc-2.c: Regenerate.

gas	* testsuite/gas/aarch64/system.s: Add test for ssbb
	and pssbb.
	* testsuite/gas/aarch64/system.d: Update accordingly
	and remove explicit addresses.
2018-07-12 15:48:02 +01:00
Tamar Christina 45a28947f3 Add remainder of Em16 restrictions for AArch64 gas.
This adds the missing Em16 constraints the rest of the instructions requiring them
and also adds a testcase to test all the instructions so these are checked from
now on.

The Em16 operand constrains the valid registers to the lower 16 registers when used
with a half precision qualifier.

The list has been cross checked (by hand) through the Arm ARM version Ca.

opcodes/

	PR binutils/23192
	* aarch64-tbl.h (sqdmlal, sqdmlal2, smlsl, smlsl2, sqdmlsl, sqdmlsl2,
	mul, smull, smull2, sqdmull, sqdmull2, sqdmulh, sqrdmulh, mla, umlal,
	umlal2, mls, umlsl, umlsl2, umull, umull2, sqdmlal, sqdmlsl, sqdmull,
	sqdmulh, sqrdmulh): Use Em16.

gas/

	PR binutils/23192
	* testsuite/gas/aarch64/illegal-by-element.s: New.
	* testsuite/gas/aarch64/illegal-by-element.d: New.
	* testsuite/gas/aarch64/illegal-by-element.l: New.
2018-07-12 10:30:35 +01:00
Sudakshina Das c597cc3d6e Adds the speculation barrier instructions to the ARM assembler and disassembler.
See:
https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability/download-the-whitepaper

opcodes	* arm-dis.c (arm_opcodes): Add ssbb and pssbb and move
	csdb together with them.
	(thumb32_opcodes): Likewise.

gas	* config/tc-arm.c (insns): Add new ssbb and pssbb instructions.
	* testsuite/gas/arm/csdb.s: Add new tests for ssbb and pssbb.
	* testsuite/gas/arm/csdb.d: Likewise
	* testsuite/gas/arm/thumb2_it_bad.s: Likewise.
	* testsuite/gas/arm/thumb2_it_bad.l: Likewise.
	* testsuite/gas/arm/barrier.d: Update with ssbb.
	* testsuite/gas/arm/barrier-thumb.d: Likewise.
2018-07-11 18:05:34 +01:00
Jan Beulich 2fb5be8dac x86: drop {,reg16_}inoutportreg variables
The checking against reg16_inoutportreg can be had with a simple test of
a bit, and the value setting from inoutportreg can be replaced by using
the actual register's reg_type field.

Note that the so far redundant 2nd instance of OPERAND_TYPE_INOUTPORTREG
is left in place, for its use in type_names[].
2018-07-11 10:28:56 +02:00
Jan Beulich bd59a6313d x86: simplify legacy prefix emission
The check_prefix label was bogus from the beginning: The special
checking is supposed to happen for PadLock insns only; no
3-opcode-byte insn should go this path.
2018-07-11 10:28:16 +02:00
Jan Beulich 7f5cad3047 x86/Intel: accept memory operand size specifiers for CET insns 2018-07-11 10:25:40 +02:00
Jan Beulich 76d3a78a49 x86: fix "REP RET" with -madd-bnd-prefix
Just like any other branches, RET should gain a BND prefix also when
already prefixed in source by REP.
2018-07-11 10:23:48 +02:00
Jeff Law 2af4d0d938 * testsuite/nds32/ji-jr.d: Fix name tag. 2018-07-09 10:35:12 -06:00
Tamar Christina cba05feb51 Fix the read/write flag for these registers on AArch64
The previous constraints were based on information already in opcodes and it
seems that a few of them were wrong.  I have now hand verified the ones changed
by the previous patch and corrected where needed.

This prevents a warning to be issued when one shouldn't be.

opcodes/

	PR binutils/23369
	* aarch64-opc.c (aarch64_sys_regs): Make read/write csselr_el1,
	vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1.

gas/testsuite/

	PR binutils/23369
	* gas/aarch64/msr.d (csselr_el1,
	vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1): New.
	* gas/aarch64/msr.s: Likewise.
2018-07-06 16:17:17 +01:00
Nick Clifton 2e48456f02 Fix the relocs created to adjust notes created by the assembler.
* write.c (maybe_generate_build_notes): Bias reloc offsets by the
	number of notes already generated.
2018-07-06 11:46:14 +01:00
Nick Clifton d8dab05495 Updated Russian, Bulgarian, and Brazilian Portuguese translations for various components of the binutuls.
ld	* po/bg.po: Updated Bulgarian translation.
	* po/pt_BR.po: Updated Brazilian Portuguese translation.

binutils* po/bg.po: Updated Bulgarian translation.

bfd,gas	* po/ru.po: Updated Russian translation.
2018-07-05 12:16:56 +01:00
Maciej W. Rozycki 14c80123c0 microMIPS/GAS: Handle several percent-ops with macros
In the microMIPS mode also accept %half, %got, %call, %got_hi, %got_lo,
%call_hi, %call_lo, %neg, %got_page, %highest, %got_disp, %tlsgd,
%tlsldm, %dtprel_hi, %dtprel_lo, %gottprel, %tprel_hi and %tprel_lo
percent-ops with macros, so that they can be used with instructions that
expand into sequences if relocation is required due to their limited
offset span, such as LL, LWL, etc., fixing GAS assertions:

.../gas/testsuite/gas/mips/elf-rel28.s: Assembler messages:
.../gas/testsuite/gas/mips/elf-rel28.s:17: Internal error in macro_build at .../gas/config/tc-mips.c:8854.
Please report this bug.

observed if an attempt is made to assemble the `elf-rel28.s' test case
modified to use one of the affected instructions to microMIPS code.

	gas/
	* config/tc-mips.c (macro_build) <'i', 'j'>: Also accept
	BFD_RELOC_16, BFD_RELOC_MIPS_GOT16, BFD_RELOC_MIPS_CALL16,
	BFD_RELOC_MIPS_GOT_HI16, BFD_RELOC_MIPS_GOT_LO16,
	BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16,
	BFD_RELOC_MIPS_SUB, BFD_RELOC_MIPS_GOT_PAGE,
	BFD_RELOC_MIPS_HIGHEST, BFD_RELOC_MIPS_GOT_DISP,
	BFD_RELOC_MIPS_TLS_GD, BFD_RELOC_MIPS_TLS_LDM,
	BFD_RELOC_MIPS_TLS_DTPREL_HI16, BFD_RELOC_MIPS_TLS_DTPREL_LO16,
	BFD_RELOC_MIPS_TLS_GOTTPREL, BFD_RELOC_MIPS_TLS_TPREL_HI16 and
	BFD_RELOC_MIPS_TLS_TPREL_LO16 relocations if in the microMIPS
	mode.
	* testsuite/gas/mips/elf-rel28-lldscd-n32.d: New test.
	* testsuite/gas/mips/elf-rel28-lldscd-micromips-n32.d: New test.
	* testsuite/gas/mips/elf-rel28-lldscd-n64.d: New test.
	* testsuite/gas/mips/elf-rel28-lldscd-micromips-n64.d: New test.
	* testsuite/gas/mips/elf-rel28.s: Add instruction selection.
	* testsuite/gas/mips/mips.exp: Run the new tests.
2018-07-02 23:57:22 +01:00
Maciej W. Rozycki 156f2c001e microMIPS/BFD: Add missing NewABI TLS and miscellaneous relocations
Complement commit df58fc944d ("MIPS: microMIPS ASE support"),
<https://sourceware.org/ml/binutils/2011-07/msg00198.html>, and add TLS
and a few miscellaneous relocations to NewABI microMIPS support, fixing
GAS assertion failures:

.../gas/testsuite/gas/mips/elf-rel28.s: Assembler messages:
.../gas/testsuite/gas/mips/elf-rel28.s:19: Internal error in append_insn at .../gas/config/tc-mips.c:7660.
Please report this bug.

observed if an attempt is made to assemble the `elf-rel28.s' test case
to microMIPS code.  The relocations are the same as with o32 support,
except for `partial_inplace' and `src_mask' updates for the respective
RELA variants.

	bfd/
	* elf64-mips.c (micromips_elf64_howto_table_rel): Add
	R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
	R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
	R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
	R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
	R_MICROMIPS_PC23_S2 relocation entries.
	(micromips_elf64_howto_table_rela): Likewise.
	(micromips_reloc_map): Likewise.
	* elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
	(elf_micromips_howto_table_rela): Likewise.
	(micromips_reloc_map): Likewise.

	gas/
	* testsuite/gas/mips/elf-rel28-micromips-n32.d: New test.
	* testsuite/gas/mips/elf-rel28-micromips-n64.d: New test.
	* testsuite/gas/mips/mips.exp: Run the new tests.
2018-07-02 23:57:22 +01:00
Thomas Preud'homme c0c468d562 [ARM] Update bfd's Tag_CPU_arch knowledge
BFD's bfd_get_mach () function returns a bfd specific value representing
the architecture of the target which is populated from the Tag_CPU_arch
build attribute value of that target. Among other users of that
interfacem, objdump which uses it to print the architecture version of
the binary being examinated and to decide what instruction is available
if run with "-m arm" via its own mapping from bfd_mach_arm_X values to
feature bits available.

However, both BFD and objdump's most recent known architecture is
Armv5TE. When encountering a newer architecture bfd_get_mach will return
bfd_mach_arm_unknown. This is unfortunate since objdump uses that value
to allow all instructions on all architectures which is already what it
does by default, making the "-m arm" trick useless.

This patch updates BFD and objdump's knowledge of Arm architecture
versions up to the latest Armv8-M Baseline and Mainline, Armv8-R and
Armv8.4-A architectures. Since several architecture versions (eg. 8.X-A)
share the same Tag_CPU_arch build attribute value and
bfd_mach_arm values, the mapping from bfd machine value to feature bits
need to return the most featureful feature bits that would yield the
given bfd machine value otherwise some instruction would not disassemble
under "-m arm" mode. The patch rework that mapping to make this clearer
and simplify writing the mapping rules. In particular, for simplicity
all FPU instructions are allowed in all cases.

Finally, the patch also rewrite the cpu_arch_ver table in GAS to use the
TAG_CPU_ARCH_X macros rather than hardcode their value.

2018-07-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
	* archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
	bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
	bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
	bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
	* bfd-in2.h: Regenerate.
	* cpu-arm.c (arch_info_struct): Add entries for above new
	bfd_mach_arm values.
	* elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
	bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
	architectures.  Force assert failure for any new Tag_CPU_arch value.

gas/
	* config/tc-arm.c (cpu_arch_ver): Use symbolic TAG_CPU_ARCH macros
	rather than hardcode their values.

ld/
	* arm-dis.c (select_arm_features): Fix typo in heading comment.  Allow
	all FPU features and add mapping from new bfd_mach_arm values to
	allowed CPU feature bits.

opcodes/
	* testsuite/ld-arm/tls-descrelax-be8.d: Add architecture version in
	expected result.
	* testsuite/ld-arm/tls-descrelax-v7.d: Likewise.
	* testsuite/ld-arm/tls-longplt-lib.d: Likewise.
	* testsuite/ld-arm/tls-longplt.d: Likewise.
2018-07-02 11:22:20 +01:00
Thomas Preud'homme a05a5b64cf Fix use of "command line X" in binutils doc
Binutils documentation uses a mix of spelling for the compound word
"command-line X". According to [1]:

"Sometimes compound words are written separately (nail polish),
sometimes with a hyphen (short-sighted) and sometimes as one word
(eyelashes). Often new compounds are written as two separate words and,
as they become more familiar, they are either connected with a hyphen
(-) or made into one word."

I think command-line X is common enough in our industry that the two
workds command and line should be connected. Since command-line is more
common than commandline, I propose to update binutils documentation to
consistently use "command-line" when this is used as an adjective to a
noun (eg. command-line argument, command-line switch, command-line
option and command-line flag). I've left occurences of "the command
line" as is. I've also left gdb, sim and readline alone and have only
touched public documentation (texi and NEWS files).

[1]
http://dictionary.cambridge.org/grammar/british-grammar/word-formation/compounds

2018-07-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
	* doc/bfdint.texi: Use command-line consistently when used in a
	compount word.
	* doc/bfdsumm.texi: Likewise.

binutils/
	* NEWS: Use command-line consistently when used in a compount word.
	* doc/binutils.texi: Likewise and fix trailing whitespace on same
	line.

gas/
	* NEWS: Use command-line consistently when used in a compount word.
	* doc/as.texi: Likewise.
	* doc/c-aarch64.texi: Likewise.
	* doc/c-alpha.texi: Likewise.
	* doc/c-arc.texi: Likewise.
	* doc/c-arm.texi: Likewise.
	* doc/c-avr.texi: Likewise.
	* doc/c-bfin.texi: Likewise.
	* doc/c-cris.texi: Likewise.
	* doc/c-epiphany.texi: Likewise.
	* doc/c-i386.texi: Likewise.
	* doc/c-ia64.texi: Likewise.
	* doc/c-lm32.texi: Likewise.
	* doc/c-m32r.texi: Likewise.
	* doc/c-m68k.texi: Likewise.
	* doc/c-mips.texi: Likewise.
	* doc/c-mmix.texi: Likewise.
	* doc/c-msp430.texi: Likewise.
	* doc/c-mt.texi: Likewise.
	* doc/c-nios2.texi: Likewise.
	* doc/c-ppc.texi: Likewise.
	* doc/c-pru.texi: Likewise.
	* doc/c-rl78.texi: Likewise.
	* doc/c-rx.texi: Likewise.
	* doc/c-tic6x.texi: Likewise.
	* doc/c-v850.texi: Likewise.
	* doc/c-vax.texi: Likewise.
	* doc/c-visium.texi: Likewise.
	* doc/c-xstormy16.texi: Likewise.
	* doc/c-xtensa.texi: Likewise.
	* doc/c-z80.texi: Likewise.
	* doc/c-z8k.texi: Likewise.
	* doc/internals.texi: Likewise.

gprof/
	* gprof.texi: Use command-line consistently when used in a compount
	word.

ld/
	* NEWS: Use command-line consistently when used in a compount word.
	* ld.texinfo: Likewise.
	* ldint.texinfo: Likewise.
2018-07-02 11:18:24 +01:00
Jim Wilson b9c04e5a82 RISC-V: Add gas support for "fp" register.
gas/
	* config/tc-riscv.c (md_begin): Call hash_reg_name for "fp".
2018-06-29 15:12:23 -07:00
Ramana Radhakrishnan ee94397044 [Patch AArch64] Warn on unpredictable stlxrb , stlxrh and stlxr cases.
A recent case in golang highlighted that gas wasn't warning on these
unpredictable cases in the architecture. Fixed thusly.

I need to audit gcc to make sure we have early clobbers on the
patterns but that's a separate patch.

Tested aarch64-none-elf and gas

Ok ?

Ramana

2018-06-29 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

        * config/tc-aarch64.c (warn_unpredictable_ldst): Add
        unpredictable cases for ldxp, stlxrb, stlxrh, stlxr.  *
        testsuite/gas/aarch64/diagnostic.s: New tests.  *
        testsuite/gas/aarch64/diagnostic.l: Adjust.
2018-06-29 13:06:05 +01:00
Tamar Christina 369c9167d4 Fix AArch64 encodings for by element instructions.
Some instructions in Armv8-a place a limitation on FP16 registers that can be
used as the register from which to select an element from.

e.g. fmla restricts Rm to 4 bits when using an FP16 register.  This restriction
does not apply for all instructions, e.g. fcmla does not have this restriction
as it gets an extra bit from the M field.

Unfortunately, this restriction to S_H was added for all _Em operands before,
meaning for a large number of instructions you couldn't use the full register
file.

This fixes the issue by introducing a new operand _Em16 which applies this
restriction only when paired with S_H and leaves the _Em and the other
qualifiers for _Em16 unbounded (i.e. using the full 5 bit range).

Also the patch updates all instructions that should be affected by this.

opcodes/

	PR binutils/23192
	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Likewise.
	* aarch64-opc-2.c: Likewise.
	* aarch64-dis.c (aarch64_ext_reglane): Add AARCH64_OPND_Em16 constraint.
	* aarch64-opc.c (operand_general_constraint_met_p,
	aarch64_print_operand): Likewise.
	* aarch64-tbl.h (aarch64_opcode_table): Change Em to Em16 for smlal,
	smlal2, fmla, fmls, fmul, fmulx, sqrdmlah, sqrdlsh, fmlal, fmlsl,
	fmlal2, fmlsl2.
	(AARCH64_OPERANDS): Add Em2.

gas/

	PR binutils/23192
	* config/tc-aarch64.c (process_omitted_operand, parse_operands): Add
	AARCH64_OPND_Em16
	* testsuite/gas/aarch64/advsimd-armv8_3.s: Expand tests to cover upper
	16 registers.
	* testsuite/gas/aarch64/advsimd-armv8_3.d: Likewise.
	* testsuite/gas/aarch64/advsimd-compnum.s: Likewise.
	* testsuite/gas/aarch64/advsimd-compnum.d: Likewise.
	* testsuite/gas/aarch64/sve.d: Likewise.

include/

	PR binutils/23192
	*opcode/aarch64.h (aarch64_opnd): Add AARCH64_OPND_Em16.
2018-06-29 12:14:42 +01:00
Alan Modra e11078da44 gas object file locations
With the update to newer autotools, some gas object files are now
built in config/, breaking xtensa-elf and ia64-vms.  This patch fixes
the dependencies.

	* configure.ac: Specify extra_objects with leading "config/"
	for xtensa-relax.o and te-vms.o.  Use case statements to unique
	extra_objects.  Formatting.
	* configure: Regenerate.
2018-06-27 17:26:52 +09:30
Nick Clifton 30aa13067f Updated translations.
gas	* po/uk.po: Updated Ukranian translation.
bfd	* po/uk.po: Updated Ukranian translation.
ld	* po/uk.po: Updated Ukranian translation.
gold	* po/uk.po: Updated Ukranian translation.

opcodes	* po/uk.po: Updated Ukranian translation.
	* po/de.po: Updated German translation.
	* po/pt_BR.po: Updated Brazilian Portuguese translation.

binutils* po/sv.po: Updated Swedish translation.
	* po/uk.po: Updated Ukranian translation.
2018-06-26 14:03:16 +01:00
Nick Clifton 791755f59d Fix the MSP430 assembler's parsing of register names.
PR 23335
	* config/tc-msp430.c (check_reg): Only accept register name
	strings that do not end in an alphanumeric character.
	* testsuite/gas/msp430/msp430x.d: Update expected disassembly.
2018-06-26 13:40:13 +01:00
Nick Clifton 71300e2c0c Regenerate configure and pot files with updated binutils version number. 2018-06-24 19:13:01 +01:00
Nick Clifton 719d828850 Add 2.30 branch notes to ChangeLogs and NEWS files. 2018-06-24 18:36:15 +01:00
Tamar Christina 514cd3a0f5 Correct negs aliasing on AArch64.
This patch fixes a disassembly issue with the aliases to subs with a shifted
register.  The subs instruction with the zero register as destination is
supposed to alias to cmp and when the first input register is the zero register
the subs is supposed to be aliased to negs.

This means that a subs with destination and first input registers the zero
register is supposed to be a cmp.

This is done by raising the priority of the cmp alias.

opcodes/

	* aarch64-tbl.h (aarch64_opcode_table): Fix alias flag for negs
	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Likewise.

gas/

	* testsuite/gas/aarch64/addsub.s: Add negs to zero reg test.
	* testsuite/gas/aarch64/addsub.d: Likewise.
2018-06-22 12:32:19 +01:00
Alan Modra d388f64333 Regen doc/Makefile.in
Also make the automake strictness "foreign".  My regeneration of the
three doc/Makefile.in files already had --foreign in the automake
invocation, so this just makes it explicit.

bfd/
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
	* doc/Makefile.in: Regenerate.
binutils/
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
	* doc/Makefile.in: Regenerate.
gas/
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
	* doc/Makefile.in: Regenerate.
zlib/
	* Makefile.in: Regenerate.
2018-06-21 23:00:05 +09:30
Nick Clifton fc6141f097 Change the ARM assembler's ADR and ADRl pseudo-ops so that they will only set the bottom bit of imported thumb function symbols if the -mthumb-interwork option is active.
For more information see the email thread starting here:
https://www.sourceware.org/ml/binutils/2018-05/msg00348.html

	PR 21458
	* tc-arm.c (do_adr): Only set the bottom bit of an imported thumb
	function symbol address if -mthumb-interwork is active.
	(do_adrl): Likewise.
	* doc/c-arm.texi: Update descriptions of the -mthumb-interwork
	option and the ADR and ADRL pseudo-ops.
	* NEWS: Mention the new behaviour of the ADR and ADRL pseudo-ops.
	* testsuite/gas/arm/pr21458.d: Add -mthumb-interwork option to
	assembler command line.
	* testsuite/gas/arm/adr.d: Likewise.
	* testsuite/gas/arm/adrl.d: Likewise.
2018-06-20 12:38:10 +01:00
Sebastian Huber 160d1b3d74 RISC-V: Accept constant operands in la and lla
opcodes/
	PR gas/23305
	* riscv-opc.c (riscv_opcodes): Use new format specifier 'B' for
	la and lla.

gas/
	PR gas/23305
	* config/tc-riscv.c (riscv_ip): Add format specifier 'B' for
	constants and symbols.
	* testsuite/gas/riscv/lla32.d: New file.
	* testsuite/gas/riscv/lla32.s: Likewise.
	* testsuite/gas/riscv/lla64-fail.d: Likewise.
	* testsuite/gas/riscv/lla64-fail.l: Likewise.
	* testsuite/gas/riscv/lla64-fail.s: Likewise.
	* testsuite/gas/riscv/lla64.d: Likewise.
	* testsuite/gas/riscv/lla64.s: Likewise.
2018-06-20 07:24:25 +02:00
Simon Marchi d0ac1c4488 Bump to autoconf 2.69 and automake 1.15.1
When trying to run the update-gnulib.sh script in gdb, I get this:

Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^      =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1.
Aborting.

Apparently, it's an issue with a regex in automake that triggers a
warning starting with Perl 5.22.  It has been fixed in automake 1.15.1.
So I think it's a good excuse to bump the versions of autoconf and
automake used in the gnulib import.  And to avoid requiring multiple
builds of autoconf/automake, it was suggested that we bump the required
version of those tools for all binutils-gdb.

For autoconf, the 2.69 version is universally available, so it's an easy
choice.  For automake, different distros and distro versions have
different automake versions.  But 1.15.1 seems to be the most readily
available as a package.  In any case, it's easy to build it from source.

I removed the version checks from AUTOMAKE_OPTIONS and AC_PREREQ,
because I don't think they are useful in our case.  They only specify a
lower bound for the acceptable version of automake/autoconf.  That's
useful if you let the user choose the version of the tool they want to
use, but want to set a minimum version (because you use a feature that
was introduced in that version).  In our case, we force people to use a
specific version anyway.  For the autoconf version, we have the check in
config/override.m4 that enforces the version we want.  It will be one
less thing to update next time we change autotools version.

I hit a few categories of problems that required some changes.  They are
described below along with the chosen solutions.

Problem 1:

  configure.ac:17: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
  configure.ac:17: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Solution 1:

  Adjust the code based on the example at that URL.

Problem 2 (in zlib/):

  Makefile.am: error: required file './INSTALL' not found
  Makefile.am:   'automake --add-missing' can install 'INSTALL'
  Makefile.am: error: required file './NEWS' not found
  Makefile.am: error: required file './AUTHORS' not found
  Makefile.am: error: required file './COPYING' not found
  Makefile.am:   'automake --add-missing' can install 'COPYING'

Solution 2:

  Add the foreign option to AUTOMAKE_OPTIONS.

Problem 3:

  doc/Makefile.am:20: error: support for Cygnus-style trees has been removed

Solution 3:

  Remove the cygnus options.

Problem 4:

  Makefile.am:656: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

Solution 4:

  Rename "INCLUDES = " to "AM_CPPFLAGS += " (because AM_CPPFLAGS is
  already defined earlier).

Problem 5:

  doc/Makefile.am:71: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead
  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 5:

  Rename .texinfo files to .texi.

Problem 6:

  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 6:

  Remove the hack at the bottom of doc/Makefile.am and use
  the info-in-builddir automake option.

Problem 7:

  doc/Makefile.am:35: error: required file '../texinfo.tex' not found
  doc/Makefile.am:35:   'automake --add-missing' can install 'texinfo.tex'

Solution 7:

  Use the no-texinfo.tex automake option.  We also have one in
  texinfo/texinfo.tex, not sure if we should point to that, or move it
  (or a newer version of it added with automake --add-missing) to
  top-level.

Problem 8:

  Makefile.am:131: warning: source file 'config/tc-aarch64.c' is in a subdirectory,
  Makefile.am:131: but option 'subdir-objects' is disabled
  automake: warning: possible forward-incompatibility.
  automake: At least a source file is in a subdirectory, but the 'subdir-objects'
  automake: automake option hasn't been enabled.  For now, the corresponding output
  automake: object file(s) will be placed in the top-level directory.  However,
  automake: this behaviour will change in future Automake versions: they will
  automake: unconditionally cause object files to be placed in the same subdirectory
  automake: of the corresponding sources.
  automake: You are advised to start using 'subdir-objects' option throughout your
  automake: project, to avoid future incompatibilities.

Solution 8:

  Use subdir-objects, that means adjusting references to some .o that will now
  be in config/.

Problem 9:

  configure.ac:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
  ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
  ../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from...
  ../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from...
  ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
  ../../lib/autoconf/general.m4:2042: AC_CACHE_VAL is expanded from...
  ../../lib/autoconf/general.m4:2063: AC_CACHE_CHECK is expanded from...
  configure.ac:375: the top level

Solution 9:

  Use AC_LANG_SOURCE, or use proper quoting.

Problem 10 (in intl/):

  configure.ac:7: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  /usr/share/aclocal/threadlib.m4:36: gl_THREADLIB_EARLY_BODY is expanded from...
  /usr/share/aclocal/threadlib.m4:29: gl_THREADLIB_EARLY is expanded from...
  /usr/share/aclocal/threadlib.m4:318: gl_THREADLIB is expanded from...
  /usr/share/aclocal/lock.m4:9: gl_LOCK is expanded from...
  /usr/share/aclocal/intl.m4:211: gt_INTL_SUBDIR_CORE is expanded from...
  /usr/share/aclocal/intl.m4:25: AM_INTL_SUBDIR is expanded from...
  /usr/share/aclocal/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
  configure.ac:7: the top level

Solution 10:

  Add AC_USE_SYSTEM_EXTENSIONS in configure.ac.

ChangeLog:

	* libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
	* README-maintainer-mode: Update version requirements.
	* ar-lib: New file.
	* test-driver: New file.
	* configure: Re-generate.

bfd/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
	(INCLUDES): Rename to ...
	(AM_CPPFLAGS): ... this.
	* configure.ac: Remove AC_PREREQ.
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
	info-in-builddir no-texinfo.tex.
	(info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
	* doc/bfd.texinfo: Rename to ...
	* doc/bfd.texi: ... this.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

binutils/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, add
	info-in-builddir no-texinfo.tex.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

config/ChangeLog:

	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

etc/ChangeLog:

	* configure.in: Remove AC_PREREQ.
	* configure: Re-generate.

gas/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11, add subdir-objects.
	(TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O): Add config/ prefix.
	* configure.ac (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O, emfiles,
	extra_objects): Add config/ prefix.
	* doc/as.texinfo: Rename to...
	* doc/as.texi: ... this.
	* doc/Makefile.am: Rename as.texinfo to as.texi throughout.
	Remove DISTCLEANFILES hack.
	(AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add no-texinfo.tex and
	info-in-builddir.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

gdb/ChangeLog:

	* common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
	PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
	* configure.ac: Remove AC_PREREQ, add missing quoting.
	* gnulib/configure.ac: Modernize usage of
	AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
	* gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
	(AUTOMAKE_VERSION): Bump to 1.15.1.
	* configure: Re-generate.
	* config.in: Re-generate.
	* aclocal.m4: Re-generate.
	* gnulib/aclocal.m4: Re-generate.
	* gnulib/config.in: Re-generate.
	* gnulib/configure: Re-generate.
	* gnulib/import/Makefile.in: Re-generate.

gdb/gdbserver/ChangeLog:

	* configure.ac: Remove AC_PREREQ, add missing quoting.
	* configure: Re-generate.
	* config.in: Re-generate.
	* aclocal.m4: Re-generate.

gdb/testsuite/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.

gold/ChangeLog:

	* configure.ac: Remove AC_PREREQ, add missing quoting and usage
	of AC_LANG_SOURCE.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
	* testsuite/Makefile.in: Re-generate.

gprof/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* Makefile.am: Remove DISTCLEANFILES hack.
	(AUTOMAKE_OPTIONS): Remove 1.11, add info-in-builddir.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
	* gconfig.in: Re-generate.

intl/ChangeLog:

	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
	* configure: Re-generate.
	* config.h.in: Re-generate.
	* aclocal.m4: Re-generate.

ld/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* Makefile.am: Remove DISTCLEANFILES hack, rename ld.texinfo to
	ld.texi, ldint.texinfo to ldint.texi throughout.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	* README: Rename ld.texinfo to ld.texi, ldint.texinfo to
	ldint.texi throughout.
	* gen-doc.texi: Likewise.
	* h8-doc.texi: Likewise.
	* ld.texinfo: Rename to ...
	* ld.texi: ... this.
	* ldint.texinfo: Rename to ...
	* ldint.texi: ... this.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.

libdecnumber/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* aclocal.m4.

libiberty/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* config.in: Re-generate.

opcodes/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.

readline/ChangeLog.gdb:

	* configure: Re-generate.
	* examples/rlfe/configure: Re-generate.

sim/ChangeLog:

	* All configure.ac: Remove AC_PREREQ.
	* All configure: Re-generate.

zlib/ChangeLog.bin-gdb:

	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add
	foreign.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
2018-06-19 16:55:06 -04:00
Faraz Shahbazker 6f20c942c3 MIPS: Add Global INValidate ASE support
Add support for the Global INValidate Application Specific Extension
for Release 6 of the MIPS Architecture.

[1] "MIPS Architecture for Programmers Volume II-A: The MIPS32
    Instruction Set Manual", Imagination Technologies Ltd., Document
    Number: MD00086, Revision 6.06, December 15, 2016, Section 3.2
    "Alphabetical List of Instructions", pp. 187-191

bfd/
	* elfxx-mips.c (print_mips_ases): Add GINV extension.

binutils/
	* readelf.c (print_mips_ases): Add GINV extension.

gas/
	* NEWS: Mention MIPS Global INValidate ASE support.
	* config/tc-mips.c (options): Add OPTION_GINV and OPTION_NO_GINV.
	(md_longopts): Likewise.
	(mips_ases): Define availability for GINV.
	(mips_convert_ase_flags): Map ASE_GINV to AFL_ASE_GINV.
	(md_show_usage): Add help for -mginv and -mno-ginv.
	* doc/as.texinfo: Document -mginv, -mno-ginv.
	* doc/c-mips.texi: Document -mginv, -mno-ginv, .set ginv and
	.set noginv.
	* testsuite/gas/mips/ase-errors-1.s: Add error checks for GINV
	ASE.
	* testsuite/gas/mips/ase-errors-2.s: Likewise.
	* testsuite/gas/mips/ase-errors-1.l: Likewise.
	* testsuite/gas/mips/ase-errors-2.l: Likewise.
	* testsuite/gas/mips/ginv.d: New test.
	* testsuite/gas/mips/ginv-err.d: New test.
	* testsuite/gas/mips/ginv-err.l: New test stderr output.
	* testsuite/gas/mips/ginv.s: New test source.
	* testsuite/gas/mips/ginv-err.s: New test source.
	* testsuite/gas/mips/mips.exp: Run the new tests.

include/
	* elf/mips.h (AFL_ASE_GINV, AFL_ASE_RESERVED1): New macros.
	(AFL_ASE_MASK): Update to include AFL_ASE_GINV.
	* opcode/mips.h: Document "+\" operand format.
	(ASE_GINV): New macro.

opcodes/
	* mips-dis.c (mips_arch_choices): Add GINV to mips32r6 and
	mips64r6 descriptors.
	(parse_mips_ase_option): Handle -Mginv option.
	(print_mips_disassembler_options): Document -Mginv.
	* mips-opc.c (decode_mips_operand) <+\>: New operand format.
	(GINV): New macro.
	(mips_opcodes): Define ginvi and ginvt.
2018-06-14 21:34:49 +01:00
Maciej W. Rozycki 8993072900 MIPS: Add CRC ASE support (ChangeLog)
Add missing ChangeLog entry in gas/ for NEWS from commit 730c31740a
("MIPS: Add CRC ASE support").
2018-06-14 21:34:48 +01:00