Commit Graph

7681 Commits

Author SHA1 Message Date
Nick Clifton 2952e9275c Fix the generation of REL relocs for missing build notes.
* write.c (create_note_reloc): Add desc2_size parameter.  Zero out
	the addend field of REL relocations.  Store the full addend into
	the note for REL relocations.
2020-07-15 12:53:59 +01:00
Nick Clifton a0af250a0e Updated French translation for the gas/ and binutils/ sub-directories 2020-07-13 14:48:15 +01:00
H.J. Lu 171ee0dc14 x86: Remove an incorrect AVX2 entry
The upper 16 vector registers were added by AVX512.

	PR gas/26212
	* doc/c-i386.texi: Remove an incorrect AVX2 entry.

(cherry picked from commit dbdba9b04d4b91121357ac9a0402d67cb53ce7ce)
2020-07-07 05:55:39 -07:00
Nick Clifton b3eaec43b9 Updated translations for various binutils sub-directories 2020-07-06 10:40:44 +01:00
Nick Clifton d63813ff85 Set version to 2.34.90 and regenerate files 2020-07-04 10:41:03 +01:00
Nick Clifton b115b9fd3c Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
Alan Modra b657622c3e Re: Change readelf's display of symbol names
Fixes some fallout from git commit 0942c7ab94.

	PR 26028
gas/
	* testsuite/gas/ia64/unwind-ilp32.d: Add -T to readelf options.
gold/
	* testsuite/Makefile.am (file_in_many_sections.stdout): Add -W
	to readelf options.
	* testsuite/Makefile.in: Regenerate.
ld/
	* testsuite/ld-arm/arm-elf.exp (vxworks1): Pass --wide to readelf
	when dumping relocs.
	* testsuite/ld-i386/i386.exp (vxworks1): Likewise.
	* testsuite/ld-sh/sh-vxworks.exp (vxworks1): Likewise.
	* testsuite/ld-sparc/sparc.exp (vxworks1): Likewise.
	* testsuite/ld-arm/vxworks1.rd: Adjust to suit.
	* testsuite/ld-i386/vxworks1.rd: Adjust.
	* testsuite/ld-sh/vxworks1.rd: Adjust.
	* testsuite/ld-sparc/vxworks1.rd: Adjust.
2020-07-03 17:15:16 +09:30
H.J. Lu c2ecccb33c x86: Add SwapSources
We check register-only source operand to decide if two source operands of
VEX encoded instructions should be swapped.  But source operands in AMX
instructions with two source operands swapped are all register-only
operand.  Add SwapSources to indicate two source operands should be
swapped.

gas/

	* config/tc-i386.c (build_modrm_byte): Check vexswapsources to
	swap two source operands.

opcodes/

	* i386-gen.c (opcode_modifiers): Add VexSwapSources.
	* i386-opc.h (VexSwapSources): New.
	(i386_opcode_modifier): Add vexswapsources.
	* i386-opc.tbl: Add VexSwapSources to BMI2 and BMI instructions
	with two source operands swapped.
	* i386-tbl.h: Regenerated.
2020-07-02 08:46:48 -07:00
Nick Clifton f436f38e7d Skip fill-1 gas test for MeP targets.
* testsuite/gas/all/fill-1.d: Skip for MeP targets.
2020-07-02 14:08:16 +01:00
Alex Coplan f405494f21 aarch64: Fix segfault on unicode symbols
This patch fixes a segfault which occurs when the AArch64 backend parses
a symbol operand that begins with a register name and ends with a
unicode byte (byte value > 127).

For example, the following input causes the crash:

x0é: udf x0é

gas/ChangeLog:

2020-07-02  Alex Coplan  <alex.coplan@arm.com>

	* config/tc-aarch64.c (reg_name_p): Fix cast so that we don't
	segfault on negative chars.
	* testsuite/gas/aarch64/reglike-label-unicode-segv.d: New test.
	* testsuite/gas/aarch64/reglike-label-unicode-segv.s: Input.
2020-07-02 13:53:07 +01:00
Nick Clifton 0942c7ab94 Change readelf's display of symbol names (when not in --wide mode) so that if they are going to be truncated then "[...]" is displayed at the end. Add a comment line option to disable this enhancement and restore the old behaviour.
PR 26028
binutils* readelf.c (print_symbol): Handle truncation of symbol names.
	(options): Add -T/--silent-truncation option.
	(parse_args): Handle the option.
	(print_dynamic_symbol): Correct calculation of width available to
	display symbol name.
	* doc/binutils.texi: Document the -T option to readelf.
	* NEWS: Mention the new feature.

gas	* testsuite/gas/ia64/group-2.d: Add -T option to readelf
	command line.
	* testsuite/gas/ia64/unwind.d: Likewise.
	* testsuite/gas/mmix/bspec-1.d: Likewise.
	* testsuite/gas/mmix/bspec-2.d: Likewise.
	* testsuite/gas/mmix/comment-1.d: Likewise.
	* testsuite/gas/tic6x/scomm-directive-4.d: Likewise.

ld	* testsuite/ld-powerpc/powerpc.exp: Add -T option to readelf
	command line when running some tests.
	* testsuite/ld-arm/arm-elf.exp: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Likewise.
	* testsuite/ld-mmix/local1.d: Likewise.
	* testsuite/ld-mmix/local3.d: Likewise.
	* testsuite/ld-mmix/local5.d: Likewise.
	* testsuite/ld-mmix/local7.d: Likewise.
	* testsuite/ld-powerpc/powerpc.exp: Likewise.
2020-07-02 11:30:52 +01:00
Alan Modra 3443489c65 obsolete xc16x
The xc16x md_apply_fix code is just so broken that in my opinion the
target should never have been accepted, and from a quick look at
commit logs for the target it appears that no one has ever contributed
fixes for anything.  This target has just been a 14 year burden on
global binutils and cgen maintainers.  That's not how free software is
supposed to work.

bfd/
	* config.bfd: Obsolete xc16x.
gas/
	* config/tc-xc16x.c (md_apply_fix): Add FIXME.
2020-07-01 10:06:43 +09:30
Alan Modra 054b336d9a gas eqv-dot test fails
* testsuite/gas/all/eqv-dot.d: xfail targets that set linkrelax
	in data sections, and mep.
2020-07-01 10:06:40 +09:30
H.J. Lu bbd19b19e4 Remove x86 NaCl target support
NaCl has been deprecated:

https://developer.chrome.com/native-client/migration

and NaCl will completely disappear in 2021:

https://lists.llvm.org/pipermail/llvm-dev/2020-April/141107.html

Remove x86 NaCl target support from bfd, binutils, gas and ld.

bfd/

	* archures.c (bfd_mach_i386_nacl): Removed.
	(bfd_mach_i386_i386_nacl): Likewise.
	(bfd_mach_x86_64_nacl): Likewise.
	(bfd_mach_x64_32_nacl): Likewise.
	* config.bfd: Remove *-*-nacl* targets.
	* configure.ac: Remove x86 NaCl target vectors.
	* cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
	(bfd_x64_32_nacl_arch): Likewise.
	(bfd_x86_64_nacl_arch): Likewise.
	(bfd_i386_nacl_arch): Likewise.
	(bfd_x64_32_arch_intel_syntax): Updated.
	* elf32-i386.c: Don't include "elf-nacl.h".
	(elf_i386_nacl_plt): Removed.
	(elf_i386_nacl_plt0_entry): Likewise.
	(elf_i386_nacl_plt_entry): Likewise.
	(elf_i386_nacl_pic_plt0_entry): Likewise.
	(elf_i386_nacl_pic_plt_entry): Likewise.
	(elf_i386_nacl_eh_frame_plt): Likewise.
	(elf_i386_nacl_plt): Likewise.
	(elf32_i386_nacl_elf_object_p): Likewise.
	(elf_i386_get_synthetic_symtab): Updated.
	(elf_i386_link_setup_gnu_properties): Likewise.
	* elf64-x86-64.c: Don't include "elf-nacl.h".
	(elf_x86_64_nacl_plt): Removed.
	(elf64_x86_64_nacl_elf_object_p): Likewise.
	(elf_x86_64_nacl_plt0_entry): Likewise.
	(elf_x86_64_nacl_plt_entry): Likewise.
	(elf_x86_64_nacl_eh_frame_plt): Likewise.
	(elf_x86_64_nacl_plt): Likewise.
	(elf32_x86_64_nacl_elf_object_p): Likewise.
	(elf_x86_64_get_synthetic_symtab): Updated.
	(elf_x86_64_link_setup_gnu_properties): Likewise.
	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
	* targets.c: Remove x86 NaCl target vectors.
	* bfd-in2.h: Regenerated.
	* configure: Likewise.

binutils/

	* NEWS: Mention x86 NaCl target support removal.
	* dwarf.c (init_dwarf_regnames_by_bfd_arch_and_mach): Remove
	x86 NaCl target support.
	* testsuite/binutils-all/elfedit-1.d: Likewise.
	* testsuite/binutils-all/i386/i386.exp: Likewise.
	* testsuite/binutils-all/x86-64/objects.exp: 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/x86-64.exp: Likewise.

gas/

	* NEWS: Mention x86 NaCl target support removal.
	* config/tc-i386.c: Remove x86 NaCl target support.
	* config/tc-i386.h: Likewise.
	* configure.tgt: Likewise.
	* testsuite/gas/i386/i386.exp: Likewise.
	* testsuite/gas/i386/iamcu-1.d: Likewise.
	* testsuite/gas/i386/iamcu-2.d: Likewise.
	* testsuite/gas/i386/iamcu-3.d: Likewise.
	* testsuite/gas/i386/iamcu-4.d: Likewise.
	* testsuite/gas/i386/iamcu-5.d: Likewise.
	* testsuite/gas/i386/k1om.d: Likewise.
	* testsuite/gas/i386/l1om.d: Likewise.

ld/

	* Makefile.am (ALL_EMULATION_SOURCES): Remove eelf_i386_nacl.c,
	eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c.
	Remove x86 NaCl dep files.
	* NEWS: Mention x86 NaCl target support removal.
	* configure.tgt: Remove x86 NaCl target support.
	* testsuite/ld-elf/binutils.exp: Likewise.
	* testsuite/ld-elf/elf.exp: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-i386/align-branch-1.d: Likewise.
	* testsuite/ld-i386/export-class.exp: Likewise.
	* testsuite/ld-i386/i386.exp: Likewise.
	* testsuite/ld-i386/load1.d: Likewise.
	* testsuite/ld-i386/pie1.d: Likewise.
	* testsuite/ld-i386/pr12570a.d: Likewise.
	* testsuite/ld-i386/pr12570b.d: Likewise.
	* testsuite/ld-i386/pr19636-1d.d: Likewise.
	* testsuite/ld-i386/pr19636-1l.d: Likewise.
	* testsuite/ld-i386/pr19636-2c.d: Likewise.
	* testsuite/ld-i386/pr19636-2d.d: Likewise.
	* testsuite/ld-i386/pr19636-2e.d: Likewise.
	* testsuite/ld-i386/pr20244-1a.d: Likewise.
	* testsuite/ld-i386/pr20244-1b.d: Likewise.
	* testsuite/ld-i386/pr20244-2a.d: Likewise.
	* testsuite/ld-i386/pr20244-2b.d: Likewise.
	* testsuite/ld-i386/pr20244-2c.d: Likewise.
	* testsuite/ld-i386/pr20244-4a.d: Likewise.
	* testsuite/ld-i386/pr20244-4b.d: Likewise.
	* testsuite/ld-i386/pr21884.d: Likewise.
	* testsuite/ld-ifunc/binutils.exp: Likewise.
	* testsuite/ld-ifunc/ifunc-10-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-10-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-11-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-11-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-12-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-12-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-13-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-13-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14c-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14c-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14d-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14d-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14e-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14e-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14f-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14f-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-15-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-15-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-i386-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-20-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-20-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-21-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-22-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5r-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-8-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-8-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-9-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-9-x86-64.d: Likewise.
	* testsuite/ld-ifunc/pr17154-i386-now.d: Likewise.
	* testsuite/ld-ifunc/pr17154-i386.d: Likewise.
	* testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/ld-x86-64/align-branch-1.d: Likewise.
	* testsuite/ld-x86-64/dwarfreloc.exp: Likewise.
	* testsuite/ld-x86-64/line.exp: Likewise.
	* testsuite/ld-x86-64/load1a.d: Likewise.
	* testsuite/ld-x86-64/load1b.d: Likewise.
	* testsuite/ld-x86-64/load1c.d: Likewise.
	* testsuite/ld-x86-64/load1d.d: Likewise.
	* testsuite/ld-x86-64/pie3.d: Likewise.
	* testsuite/ld-x86-64/pr18160.d: Likewise.
	* testsuite/ld-x86-64/pr19013-x32.d: Likewise.
	* testsuite/ld-x86-64/pr19013.d: Likewise.
	* testsuite/ld-x86-64/pr19636-2d.d: Likewise.
	* testsuite/ld-x86-64/pr19636-2l.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1b.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1d.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1f.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1h.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1j.d: Likewise.
	* testsuite/ld-x86-64/pr20253-1l.d: Likewise.
	* testsuite/ld-x86-64/pr21884.d: Likewise.
	* testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
	* testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
	* testsuite/ld-x86-64/tlsgd10.dd: Likewise.
	* testsuite/ld-x86-64/tlsgd5.dd: Likewise.
	* testsuite/ld-x86-64/tlsgd8.dd: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* emulparams/elf32_x86_64_nacl.sh: Removed.
	* emulparams/elf_i386_nacl.sh: Likewise.
	* emulparams/elf_x86_64_nacl.sh: Likewise.
	* testsuite/ld-i386/emit-relocs-nacl.rd: Likewise.
	* testsuite/ld-i386/load1-nacl.d: Likewise.
	* testsuite/ld-i386/pie1-nacl.d: Likewise.
	* testsuite/ld-i386/plt-nacl.pd: Likewise.
	* testsuite/ld-i386/plt-pic-nacl.pd: Likewise.
	* testsuite/ld-i386/pr17709-nacl.rd: Likewise.
	* testsuite/ld-i386/pr19636-1d-nacl.d: Likewise.
	* testsuite/ld-i386/pr19636-2c-nacl.d: Likewise.
	* testsuite/ld-i386/pr19636-2d-nacl.d: Likewise.
	* testsuite/ld-i386/pr19636-2e-nacl.d: Likewise.
	* testsuite/ld-i386/pr19827-nacl.rd: Likewise.
	* testsuite/ld-i386/pr21884-nacl.d: Likewise.
	* testsuite/ld-i386/pr21884-nacl.t: Likewise.
	* testsuite/ld-i386/tlsbin-nacl.rd: Likewise.
	* testsuite/ld-i386/tlsbin2-nacl.rd: Likewise.
	* testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise.
	* testsuite/ld-i386/tlsdesc-nacl.rd: Likewise.
	* testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise.
	* testsuite/ld-i386/tlsnopic-nacl.rd: Likewise.
	* testsuite/ld-i386/tlspic-nacl.rd: Likewise.
	* testsuite/ld-i386/tlspic2-nacl.rd: Likewise.
	* testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise.
	* testsuite/ld-x86-64/load1a-nacl.d: Likewise.
	* testsuite/ld-x86-64/load1b-nacl.d: Likewise.
	* testsuite/ld-x86-64/load1c-nacl.d: Likewise.
	* testsuite/ld-x86-64/load1d-nacl.d: Likewise.
	* testsuite/ld-x86-64/pie3-nacl.d: Likewise.
	* testsuite/ld-x86-64/plt-nacl.pd: Likewise.
	* testsuite/ld-x86-64/pr17709-nacl.rd: Likewise.
	* testsuite/ld-x86-64/pr19013-nacl.d: Likewise.
	* testsuite/ld-x86-64/pr19636-2d-nacl.d: Likewise.
	* testsuite/ld-x86-64/pr19827-nacl.rd: Likewise.
	* testsuite/ld-x86-64/pr21884-nacl.d: Likewise.
	* testsuite/ld-x86-64/pr21884-nacl.t: Likewise.
	* testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlsdesc-nacl.pd: Likewise.
	* testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlspic-nacl.rd: Likewise.
	* testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise.
	* Makefile.in: Regenerated.
	* po/BLD-POTFILES.in: Likewise.
2020-06-30 08:56:14 -07:00
Nelson Chu 08ccfccf0e RISC-V: Support debug and float CSR as the unprivileged ones.
The unprivileged CSR should be controlled by other specific specs rather
than the privileged spec.  For example, the debug CSR should be controlled
by the debug spec, and the float CSR should be controlled by the float
spec.  User may use assembler options to choose what the debug and other
specs they want, or may encode the versions of specs into the architecture
string directly.  Since we haven't decided which one is better, we set the
defined and aborted versions of unprivileged CSR to PRIV_SPEC_CLASS_NONE
in the include/opcode/riscv-opc.h, to tell assembler don't check priv spec
versions for them.  However, these PRIV_SPEC_CLASS_NONE will be changed
to FLOAT_SPEC_CLASS_* and DEBUG_SPEC_CLASS_* in the future.

	gas/
	* config/tc-riscv.c (riscv_csr_class_check): Removed.  Move the
	checking into riscv_csr_address.
	(riscv_csr_version_check): Likewise.
	(riscv_csr_address): New function.  Return the suitable CSR address
	after checking the ISA dependency and versions.  Issue warnings	if
	we find any conflict and -mcsr-check is set.  CSR_CLASS_F and
	CSR_CLASS_DEBUG are unprivileged CSR for now, so don't check the
	priv spec versions for them.
	(reg_csr_lookup_internal): Call riscv_csr_address to find the
	suitable CSR address.

	* testsuite/gas/riscv/priv-reg-fail-fext.d: Remove -mpriv-spec=1.11.
	* testsuite/gas/riscv/priv-reg-fail-read-only-01.d: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-rv32-only.d: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-fext.l:  We don't care the
	priv spec warnings here.  These warnings are added by accident.
	Remove them and only focus on the ISA dependency warnings.
	* testsuite/gas/riscv/priv-reg-fail-rv32-only.l: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-read-only-01.l: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-version-1p9.l: Updated since
	dscratch0 and dscratch1 are regarded as the unprivileged CSR rather
	than the privileged ones.
	* testsuite/gas/riscv/priv-reg-fail-version-1p9p1.l: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-version-1p10.l: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-version-1p11.l: Likewise.
	* testsuite/gas/riscv/priv-reg.s: Likewise.  Add missing debug CSR.
	* testsuite/gas/riscv/priv-reg-version-1p9.d: Likewise.
	* testsuite/gas/riscv/priv-reg-version-1p9p1.d: Likewise.
	* testsuite/gas/riscv/priv-reg-version-1p10.d: Likewise.
	* testsuite/gas/riscv/priv-reg-version-1p11.d: Likewise.
	* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
	* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.

	include/
	* opcode/riscv-opc.h: Support the unprivileged CSR.  The versions
	of the unprivileged CSR should be PRIV_SPEC_CLASS_NONE for now.
	* opcode/riscv.h (enum riscv_csr_class): Add CSR_CLASS_DEBUG.

	opcodes/
	* riscv-dis.c (print_insn_args, case 'E'): Updated.  Let the
	unprivileged CSR can also be initialized.
2020-06-30 09:54:55 +08:00
H.J. Lu 8c190ce038 x86: Support VEX base opcode length > 1
Intel AMX instructions with 8-bit immediate opcode extension without
operands:

tilerelease, 0, 0x49c0, None, 2, CpuAMX_TILE|Cpu64, Vex|VexOpcode=1|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }

Update build_vex_prefix to support VEX base opcode length > 1.

	* tc-i386.c (build_vex_prefix): Support VEX base opcode length > 1.
	(md_assemble): Don't process ImmExt without operands.
2020-06-29 06:28:46 -07:00
Hans-Peter Nilsson 4e394b28e3 gas/testsuite: test-case for PR25331 (mmix reloc fixup bug)
The bug manifested "only" for a 64-bit host:

pr25331.c: Assembler messages:
pr25331.c:430: Error: internal error: fixup not contained within frag
failed with: <pr25331.c: Assembler messages:
pr25331.c:430: Error: internal error: fixup not contained within frag>, no expected output
FAIL: gas/mmix/pr25331

gas:
	PR gas/25331
	* testsuite/gas/mmix/pr25331.d, testsuite/gas/mmix/pr25331.s: New test.
2020-06-29 05:38:26 +02:00
Hans-Peter Nilsson b20e7614da gas: Fix mmix fixups and TC_FX_SIZE_SLACK, PR25331
Finally; sorry for the delay.  There were a few false starts, where I
misinterpreted the error-messages and the comment that Alan added:
it's not the fix size that's too large (and the frag too small), it's
stating the wrong size of what will be "fixed up" - that of the actual
target value, not the size of the field that needs to be adjusted.
Comments added for clarity.

Test-suite committed separately.

gas:
	PR gas/25331
	* config/tc-mmix.c (md_assemble) <fixup for
	BFD_RELOC_MMIX_BASE_PLUS_OFFSET>: This fixup affects 1 byte, not 8.
	Also, set its fx_no_overflow.
	(md_convert_frag) <case ENCODE_RELAX (STATE_PUSHJSTUB, STATE_ZERO)>:
	Similarly this fixup affects 4 bytes, not 8 and needs its
	fx_no_overflow set.
	* config/tc-mmix.h (TC_FX_SIZE_SLACK): Don't define.
2020-06-29 05:32:02 +02:00
Alan Modra 279edac53d C++ comments
binutils isn't c99 (yet).  This replaces or removes some C++ style
comments.

bfd/
	* arc-got.h: Use C style comments.
	* coff-z80.c: Likewise.
	* elf32-csky.c: Likewise.
	* peXXigen.c: Likewise.
	* elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
	code.
binutils/
	* dwarf.c: Use C style comments.
	* resrc.c: Likewise.
gas/
	* config/tc-s12z.c: Use C style comments.
	* config/tc-z80.c: Likewise.
	* config/tc-xtensa.c (emit_ld_r_n): Remove commented out code.
include/
	* coff/internal.h: Use C style comments.
	* coff/pe.h: Likewise.
	* elf/ppc64.h: Likewise.
opcodes/
	* arm-dis.c: Use C style comments.
	* cr16-opc.c: Likewise.
	* ft32-dis.c: Likewise.
	* moxie-opc.c: Likewise.
	* tic54x-dis.c: Likewise.
	* s12z-opc.c: Remove useless comment.
	* xgate-dis.c: Likewise.
2020-06-29 10:07:56 +09:30
H.J. Lu b6cd5d100a x86: Process ImmExt without operands
To support Intel AMX instructions with 8-bit immediate opcode extension,
but without operands:

tilerelease, 0, 0x49, 0xc0, 1, CpuAMX_TILE|Cpu64, Vex|VexOpcode=1|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|ImmExt, { 0 }

process ImmExt without operands.

	* config/tc-i386.c (md_assemble): Process ImmExt without
	operands.
2020-06-26 10:25:12 -07:00
H.J. Lu 63112cd67b x86: Rename VecSIB to SIB for Intel AMX
Rename VecSIB to SIB to support Intel Advanced Matrix Extensions which
introduces instructions with a mandatory SIB byte which isn't a vector
SIB (VSIB).

gas/

	* config/tc-i386.c (check_VecOperands): Replace vecsib with sib.
	Replace VecSIB128, VecSIB256 and VecSIB512 with VECSIB128,
	VECSIB256 and VECSIB512, respectively.
	(build_modrm_byte): Replace vecsib with sib.

opcodes/

	* i386-gen.c (opcode_modifiers): Replace VecSIB with SIB.
	(VecSIB128): Renamed to ...
	(VECSIB128): This.
	(VecSIB256): Renamed to ...
	(VECSIB256): This.
	(VecSIB512): Renamed to ...
	(VECSIB512): This.
	(VecSIB): Renamed to ...
	(SIB): This.
	(i386_opcode_modifier): Replace vecsib with sib.
	* i386-opc.tbl (VexSIB128): New.
	(VecSIB256): Likewise.
	(VecSIB512): Likewise.
	Replace VecSIB=1, VecSIB=2 and VecSIB=3 with VexSIB128, VecSIB256
	and VecSIB512, respectively.
2020-06-26 08:24:44 -07:00
Jan Beulich 2a1bb84c67 x86: fix processing of -M disassembler option
Multiple -M options can be specified in any order. Therefore stright
assignment to fields affected needs to be avoided, such that earlier
options' effects won't be discarded. This was in particular a problem
for -Msuffix followed by certain of the other sub-options.

While updating documentation, take the liberty and also drop the
redundant mentioning of being able to comma-separate multiple options.
2020-06-26 16:42:55 +02:00
Pat Bernardi 85f7484a3a m68k: tag floating-point ABI used
This patch adds GNU attribute support to m68k and utilises it to tag the
floating-point calling convention used (hard-float or soft-float). It enables
the linker to ensure linked objects use a consistent floating-point ABI and
allows tools like GDB to infer the ABI used from the ELF file. It is based on
similar work done for PowerPC.

bfd/
	* elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
	(elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
binutils/
	* readelf.c (display_m68k_gnu_attribute): New function.
	(process_arch_specific): Call display_m68k_gnu_attribute for EM_68K.
gas/
	* config/tc-m68k.c (m68k_elf_gnu_attribute): New function.
	(md_pseudo_table): Handle "gnu_attribute".
	* doc/as.texi: Document GNU attribute for M68K.
include/
	* elf/m68k.h: Add enum for GNU object attribute with floating point
	tag name and values.
ld/
	* testsuite/ld-m68k/attr-gnu-4-0.s: New file.
	* testsuite/ld-m68k/attr-gnu-4-1.s: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-2.s: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-00.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-01.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-02.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-10.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-11.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-12.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-20.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-21.d: Likewise.
	* testsuite/ld-m68k/attr-gnu-4-22.d: Likewise.
	* testsuite/ld-m68k/m68k.exp: Run the new tests.
2020-06-26 14:42:19 +09:30
Nick Clifton b59d128a11 Stop the assembler from generating R_ARM_THM_JMP11 relocations as these are not supported by the kernel.
PR 26141
	* config/tc-arm.c (arm_force_relocation): Force resolution of
	BFD_RELOC_THUMB_PCREL_BRANCH12 relocations.
	* testsuite/gas/arm/plt-1.d: Adjust expected disassembly.
2020-06-25 11:11:51 +01:00
Jan Beulich c423d21a43 x86: move ImmExt processing
With abuses of ImmExt gone, all templates using it have operands. Move
its main invocation into process_operands(), matching its secondary one
for the SSE2AVX case.
2020-06-25 09:30:09 +02:00
Jan Beulich 8bbb3ad806 x86: operand sizing prefixes can disambiguate insns
Use of an explicit data size or REX.W prefix is sufficient indication of
the intended operation when operand size can't be derived from suffix or
register operands. Avoid the ambiguity warning and make in particular
immediate handling (sizing) cope with explicitly specified prefixes.

Extending/reusing the noreg16 test made me notice a few cases of
unintentional 32-bit addressing, which gets corrected at the same time.
2020-06-25 09:29:29 +02:00
Jan Beulich 589958d6ff x86: fix SYSRET disassembly, improve {,V}CVTSI2S{S,D} and PTWRITE
SYSRET can't use the same macro as IRET, since there's no 16-bit operand
size form of it. Re-use LQ for it instead.

Doing so made obvious that outside of 64-bit mode {,V}CVTSI2S{S,D} and
PTWRITE should have an 'l' suffix printed only in suffix-always mode.
2020-06-25 09:27:21 +02:00
Jan Beulich 0b9404fd37 x86-64: REX prefix is invalid with VEX etc
Just like for the data size prefix (see commit 7a8655d2bb ["x86: don't
abort() upon DATA16 prefix on (E)VEX encoded insn"]), any form of REX
prefix is invalid with VEX/XOP/EVEX.
2020-06-25 09:26:28 +02:00
Jan Beulich a5aeccd9d3 x86-64: honor REX prefixes for SSE2AVX
Legacy encoded insns do so, and their automatic conversion to AVX ones
ought to produce functionally identical code. Therefore explicit REX
prefixes cannot simply be ignored. This is in particular relevant
because at least PCMPESTR{I,M}'s 64-bit forms couldn't be expressed in
older gas by other than using a REX64 prefix.
2020-06-25 09:25:52 +02:00
Jan Beulich 40d231b4fb x86: also refuse data size prefix on SIMD insns
The data size prefix alters the meaning of legacy encoded SIMD insns,
and hence shouldn't be accepted there. Use of it also leads to
inconsistencies in SSE2AVX mode. Don't match insns with data size prefix
against SSE2AVX templates.
2020-06-25 09:25:12 +02:00
Jan Beulich 11abe42647 x86: drop stray assignment from build_evex_prefix()
Unlike in build_vex_prefix() this is not needed here.
2020-06-25 09:24:23 +02:00
Nelson Chu 1a79004f61 RISC-V: Generate ELF priv attributes if priv instruction are explicited used.
We should generate the ELF priv attributes only if,

1. The priv attributes are already set in the assembly file.
2. The CSR are explicited used.
3. The privileged instruction are explicited used.

* There are four privileged instruction defined in the v1.11 priv spec:
`mret`, `sret`, `wfi` and `sfence.vma`.

* `sfence.vm` is dropped in the v1.10 priv spec.

* `uret` is actually a N-ext instruction.  So it is better to regard it as
an user instruction rather than the priv instruction.

* `hret` is used to return from traps in H-mode.  H-mode is removed since
the v1.10 priv spec, but probably be added in the new hypervisor spec.
Therefore, `hret` should be controlled by the hypervisor spec rather than
priv spec in the future.

* `dret` is a debug instruction.  We should record the debug spec versions
once it is explicited used in the future.

	gas/
	* config/tc-riscv.c (explicit_priv_attr): Rename explicit_csr to
	explicit_priv_attr.  It used to indicate CSR or priv instructions are
	explictly used.
	(riscv_is_priv_insn): Return True if it is a privileged instruction.
	(riscv_ip): Call riscv_is_priv_insn to check whether the instruction
	is privileged or not.  If it is, then set explicit_priv_attr to TRUE.
	(riscv_write_out_attrs): Clarification of when to generate the elf
	priv spec attributes.

	* testsuite/gas/riscv/attribute-11.s: Add comments.
	* testsuite/gas/riscv/attribute-14.s: New testcase.  Use symbol
	`priv_insn_<n>` to decide which priv instruction is expected to used.
	(<n> is a to g.)
	* testsuite/gas/riscv/attribute-14a.d: Likewise.
	* testsuite/gas/riscv/attribute-14b.d: Likewise.
	* testsuite/gas/riscv/attribute-14c.d: Likewise.
	* testsuite/gas/riscv/attribute-14d.d: Likewise.
	* testsuite/gas/riscv/attribute-14e.d: Likewise.
2020-06-23 09:38:12 +08:00
Nelson Chu 39ff0b8123 RISC-V: Report warning when linking the objects with different priv specs.
We do know some conflicts among different privileged specs.  For linker,
the safest approach is that don't allow the object linked with others which
may cause conflicts.  But this may cause inconvenience since not all objects
with conflicting priv specs are linked will cause problems.  But it is hard
to know the detailed conflict cases for linker, so we probably need a option
to tell linker that we do know there are no conflicts, or we are willing to
take risks to link the objects with conflicted priv specs.  But the option
is still under discussion.

Therefore, we can report warnings rather than errors when linking the objects
with conflicted priv specs.  This not only makes the linker more flexible,
but also warns people that the conflicts may happen.  We also need to update
the output priv spec version once the input priv spec is newer.

	bfd/
	* elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
	opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
	(riscv_get_priv_spec_class): Likewise.
	(riscv_get_priv_spec_name): Likewise.
	(riscv_get_priv_spec_class_from_numbers): New function, convert
	the version numbers into string, then call riscv_get_priv_spec_class
	to get the priv spec class.
	* elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
	from include/opcode/riscv.h to bfd/elfxx-riscv.h.
	(riscv_get_priv_spec_name): Likewise.
	(riscv_get_priv_spec_class_from_numbers): New forward declaration.
	(opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
	* elfnn-riscv.c (riscv_merge_attributes):  Get the priv spec classes
	of input and output objects form their priv spec attributes by
	riscv_get_priv_spec_class_from_numbers.  Report warning rather than
	errors when linking objects with differnet priv spec versions.  We do
	know v1.9.1 may have conflicts to other versions, so report the
	warning, too.  After that, update the output priv spec version to the
	newest one so far.

	gas/
	* config/tc-riscv.c (buf_size, buf): Remove the unused variables.
	(riscv_set_default_priv_spec): Get the priv spec version from the
	priv spec attributes by riscv_get_priv_spec_class_from_numbers.

	include/
	* opcode/riscv.h (riscv_get_priv_spec_class): Move the function
	forward declarations to bfd/elfxx-riscv.h.
	(riscv_get_priv_spec_name): Likewise.

	opcodes/
	* riscv-opc.c: Move the structures and functions to bfd/elfxx-riscv.c.
	* riscv-dis.c: Include elfxx-riscv.h.

	ld/
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Updated.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d: Updated.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d: Updated.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d: Updated.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d: Updated.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d: Updated.
2020-06-22 10:01:14 +08:00
Alan Modra e2201c2a57 SH gas configure and ld tests
All current SH gas targets use BFD.  sh-coff was incorrectly reported
as unsupported.

gas/
	* configure.tgt: Set bfd_gas for all SH targets.
ld/
	* testsuite/ld-sh/sh.exp: Don't run relax tests for non-ELF.
	Fail when ld_assemble fails.  Use elseif to reduce indentation.
2020-06-20 10:56:39 +09:30
Jan Beulich d27c357a5b x86: also test alternative VMGEXIT encoding
gas/

	* testsuite/gas/i386/arch-13.s: Add alternative VMGEXIT case.
	* testsuite/gas/i386/arch-13.d: Extend -march=. Adjust
	expectations.

opcodes/

	* i386-dis.c (prefix_table): Revert the last vmgexit change.
2020-06-18 04:58:27 -07:00
Cui,Lili 708a2ffff5 x86: Correct noavx512_vp2intersect
* config/tc-i386.c (cpu_arch): Correct noavx512_vp2intersect
	cpu_arch to CPU_ANY_VP2INTERSECT_FLAGS.
	* doc/c-i386.texi: Add avx512_vp2intersect.
2020-06-16 10:07:15 -07:00
Jan Beulich 2106ed9baf x86: drop SSE4a from SSE check again
Upon re-consideration in commit 569d50f1c6 ("x86: further refine SSE
check (SSE4a, SHA, GFNI)") I went too far: Mixing of SSE and AVX insns
doesn't suffer as bad a penalty on AMD CPUs as on Intel ones. SSE4a
being an AMD-only extension, it shouldn't be part of the ISA extensions
set for which the diagnostic may get issued. Undo that part.
2020-06-16 10:34:55 +02:00
Alan Modra a435742a7f Really remove tic30-aout support
bfd/
	* aout-tic30.c: Delete file.
	* Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
	(BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
	* config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
	(xc16x-*-elf): Sort properly.
	* configure.ac: Remove tic30_aout_vec.
	* targets.c: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
gas/
	* config/tc-tic30.h: Remove OBJ_AOUT support.
	* configure.tgt: Delete tic30-*-*aout* entry.
ld/
	* emulparams/tic30aout.sh: Delete file.
	* scripttempl/tic30aout.sc: Delete file.
	* Makefile.am: Remove etic30aout.c from ALL_EMULATION_SOURCES and
	delete dependency.
	* configure.tgt: Delete tic30-*-*aout* entry.
	* testsuite/ld-scripts/sane1.d: Delete tic30-*-aout mention.
	* testsuite/ld-scripts/segment-start.d: Likewise.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2020-06-16 15:57:59 +09:30
Max Filippov 7a77f1ac2c xtensa: allow runtime ABI selection
2020-06-15  Max Filippov  <jcmvbkbc@gmail.com>
bfd/
	* elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
	(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
	(elf32xtensa_abi): New global variable.
	(xtensa_abi_choice): New function.
	(elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
	XSHAL_ABI to select PLT code.

gas/
	* config/tc-xtensa.c (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New
	macros.
	(elf32xtensa_abi): New declaration.
	(option_abi_windowed, option_abi_call0): New enum constants.
	(md_longopts): Add entries for --abi-windowed and --abi-call0.
	(md_parse_option): Add handlers for --abi-windowed and
	--abi-call0.
	(xtensa_add_config_info): Use xtensa_abi_choice instead of
	XSHAL_ABI to format ABI tag.
	* doc/as.texi (Target Xtensa options): Add --abi-windowed and
	--abi-call0 to the list of options.
	* doc/c-xtensa.texi: Add description for options --abi-windowed
	and --abi-call0.
	* testsuite/gas/xtensa/abi-call0.d: New test definition.
	* testsuite/gas/xtensa/abi-windowed.d: New test definition.
	* testsuite/gas/xtensa/abi.s: New test source.

include/
	* elf/xtensa.h (xtensa_abi_choice): New declaration.

ld/
	* emultempl/xtensaelf.em (XSHAL_ABI): Remove macro definition.
	(XTHAL_ABI_UNDEFINED, XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New
	macros.
	(elf32xtensa_abi): New declaration.
	(xt_config_info_unpack_and_check): Set elf32xtensa_abi if it is
	undefined.  Use xtensa_abi_choice instead of XSHAL_ABI to test
	ABI tag consistency.
	(xtensa_add_config_info): Use xtensa_abi_choice instead of
	XSHAL_ABI to format ABI tag.
	(PARSE_AND_LIST_PROLOGUE): Define OPTION_ABI_WINDOWED,
	OPTION_ABI_CALL0 and declare elf32xtensa_abi.
	(PARSE_AND_LIST_LONGOPTS): Add entries for --abi-windowed and
	--abi-call0.
	(PARSE_AND_LIST_OPTIONS): Add help text for --abi-windowed and
	--abi-call0.
	(PARSE_AND_LIST_ARGS_CASES): Add handlers for --abi-windowed and
	--abi-call0.
	* ld.texi: Add description for options --abi-windowed and
	--abi-call0.
2020-06-15 13:01:30 -07:00
H.J. Lu efe30057d2 x86: Correct xsusldtrk mnemonic
The correct mnemonic is xsusldtrk, not xsuspldtrk.

gas/

	PR gas/26115
	* testsuite/gas/i386/tsxldtrk.d: Replace xsuspldtrk with
	xsusldtrk.
	* testsuite/gas/i386/tsxldtrk.s: Likewise.
	* testsuite/gas/i386/x86-64-tsxldtrk.d: Likewise.
	* testsuite/gas/i386/x86-64-tsxldtrk.s: Likewise.

opcodes/

	PR gas/26115
	* i386-dis.c (prefix_table): Replace xsuspldtrk with xsusldtrk.
	* i386-opc.tbl: Likewise.
	* i386-tbl.h: Regenerated.
2020-06-14 05:18:35 -07:00
Nelson Chu d8af286fff RISC-V: Drop the privileged spec v1.9 support.
There is a conflict between v1.9 and v1.9.1 - CSR MISA address.  MISA is
0xf10 in v1.9, but change to 0x301 in v1.9.1.  The change made MISA writable,
but may also cause risk of compatibility.  Binutils already support the
-mpriv-spec options and ELF priv attributes, which can used to choose what
privileged spec you want, and then give a correponding CSR name and address
to use.  But Gdb and other tools don't have the simialr mechanism for now.
However, there are two things can be confirmed,

1. If we don't have a way to control the priv specs, then the changes, like
MISA, will cause risk and hard to maintain.

2. We get the guarantee that the CSR address won't be reused in the future
specs, even if it is dropped.

I'm not sure if Gdb needs to care about the priv spec versions, it is still
discussing.  But drop the priv spec v1.9, and make sure that we won't reuse
the CSR address is a useful solution for now.  Also, we might drop the v1.9.1
in a year or two.  After that, specs above v1.10 should be compatible anyway.

	gas/
	* testsuite/gas/riscv/priv-reg-fail-version-1p9.d: Removed.
	* testsuite/gas/riscv/priv-reg-fail-version-1p9.l: Likewise.
	* testsuite/gas/riscv/priv-reg-version-1p9.d: Likewise.

	include/
	* opcode/riscv-opc.h: Update the defined versions of CSR from
	PRIV_SPEC_CLASS_1P9 to PRIV_SPEC_CLASS_1P9P1.  Also, drop the
	MISA DECLARE_CSR_ALIAS since it's aborted version is v1.9.
	* opcode/riscv.h (enum riscv_priv_spec_class): Remove
	PRIV_SPEC_CLASS_1P9.

	opcodes/
	* riscv-opc.c (priv_specs): Remove v1.9 and PRIV_SPEC_CLASS_1P9.
2020-06-12 09:41:20 +08:00
Seth Girvan 18ca16bec8 [PATCH] gas/doc: improve AVR modifiers wording.
* doc/c-avr.texi: Improve wording.
2020-06-09 11:13:39 +01:00
Jan Beulich 6778f1c485 x86: add missing 64-bit tests for "don't ignore mandatory pseudo prefixes"
Commit da4977e00b added the 32-bit test files, but failed to add the
64-bit ones.
2020-06-09 11:28:15 +02:00
Jan Beulich 73239888b3 x86: consistently print prefixes explicitly which are invalid with VEX etc
All of data size, rep, lock, and rex prefixes are invalid with VEX- and
alike encoded insns. Make sure they get printed explicitly in all cases,
to signal the anomaly. With this, do away with "rex_ignored" - if there
is a rex prefix, we want to print it anyway for VEX etc (and there's
nothing "ignored" about it in the first place - such an instruction will
raise #UD).
2020-06-09 08:59:04 +02:00
Jan Beulich bf926894b6 x86: correct decoding of packed-FP-only AVX encodings
Various AVX insns utilizing the X macro fail to reject F3/F2 embedded
prefix encodings. As the PREFIX_OPCODE attribute wasn't used by any
non-legacy-encoded insns so far, re-use it to achieve the intended
effect.
2020-06-09 08:56:39 +02:00
Jan Beulich 828c2a2580 x86-64: adjust far indirect branch handling
An unwanted side effect of 5990e377e5 ("x86-64: Intel64 adjustments
for insns dealing with far pointers") was that with -mintel64 LCALL and
LJMP would now default to 64-bit operand size. Since 64-bit far branches
aren't portable, the default operand size should still be 32-bit.
However, since the 64-bit variant is permitted, an ambiguous operand
warning should be issued.

As to the actual code change, please note that the conditional
surrounding the switch() that gets adjusted covers several cases which
are of no interest to or benign in 64-bit mode, hence the new
conditional added can be quite a bit less involved.
2020-06-09 08:47:31 +02:00
Jan Beulich da4977e00b x86: don't ignore mandatory pseudo prefixes
{vex}, {vex3}, and {evex} are mandatory prefixes, and hence should not
be randomly ignored. Fix this for insns without operands as well as for
insns referencing the high 16 [XYZ]MM registers. To achieve the former,
re-purpose VEX_check_operands(), renaming it to VEX_check_encoding() and
moving its only operand check to check_VecOperands().

This involves fixing a testcase relying on {vex2} to get ignored.
2020-06-09 08:46:22 +02:00
Alex Coplan 26417f1919 [PATCH] arm: Add DFB instruction for ARMv8-R
gas/ChangeLog:
2020-06-08  Alex Coplan  <alex.coplan@arm.com>

	* config/tc-arm.c (insns): Add dfb.
	* testsuite/gas/arm/dfb.d: New test.
	* testsuite/gas/arm/dfb.s: Input for test.

opcodes/ChangeLog:
2020-06-08  Alex Coplan  <alex.coplan@arm.com>

	* arm-dis.c (arm_opcodes): Add dfb.
	(thumb32_opcodes): Add dfb.
2020-06-08 15:16:29 +01:00
Nick Clifton 9f3e7dbcba Fix a gas testsuite failure for PE based targets which cannot assemble the cfi-i386-2 test.
* testsuite/gas/cfi/cfi-i386-2.d: Skip for PE based targets.
2020-06-08 10:25:57 +01:00
Jan Beulich dd6b8a0bc2 x86: also handle %k<N> and %bnd<N> in debugging helpers
Adjustment of this function was missed when support for the respective
registers was added.
2020-06-08 08:40:58 +02:00