]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
7 years agoMove support code for linker script DEFINED to ldexp.c
Alan Modra [Mon, 22 Dec 2014 00:15:13 +0000 (10:45 +1030)] 
Move support code for linker script DEFINED to ldexp.c

This moves support code for DEFINED to ldexp.c where it is used,
losing the lang_ prefix on identifiers.  Two new functions are needed
to initialize and clean up to hash table, but other than that there
are no functional changes here.

* ldexp.c (struct definedness_hash_entry, definedness_table)
(definedness_newfunc, symbol_defined, update_definedness): Move
and rename from..
* ldlang.h (struct lang_definedness_hash_entry): ..here,..
* ldlang.c (lang_definedness_table, lang_definedness_newfunc)
(lang_symbol_defined, lang_update_definedness): ..and here.
* ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from..
* ldlang.c (lang_init, lang_finish): ..here.
* ldexp.h (ldexp_init, ldexp_finish): Declare.
* ldlang.h (lang_symbol_defined, lang_update_definedness): Delete.
* ldmain.c (main): Call ldexp_init and ldexp_finish.

7 years ago[GOLD] Fix powerpc overflow check
Cary Coutant [Mon, 22 Dec 2014 18:13:37 +0000 (10:13 -0800)] 
[GOLD] Fix powerpc overflow check

* powerpc.cc (Target_powerpc::relocate): Fix overflow check.

7 years agoSet ppc COMMONPAGESIZE to 64k
Richard Henderson [Thu, 18 Dec 2014 21:40:25 +0000 (15:40 -0600)] 
Set ppc COMMONPAGESIZE to 64k

bfd/
* elf32-ppc.c (ELF_COMMONPAGESIZE): Set to 64k.
* elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.

7 years agoDisplay DW_LANG_C11 as (C11).
Mark Wielaard [Thu, 18 Dec 2014 02:35:53 +0000 (13:05 +1030)] 
Display DW_LANG_C11 as (C11).

* dwarf.c (read_and_display_attr_value): Change display name of
DW_LANG_C11 from (ANSI C11) to (C11).

7 years agoPowerPC register numbers in DWARF
Alan Modra [Fri, 12 Dec 2014 05:32:34 +0000 (16:02 +1030)] 
PowerPC register numbers in DWARF

This makes gas .cfi output to .debug_frame match register numbering
emitted by gcc.  md_reg_eh_frame_to_debug_frame follows the ABI,
targets not using it, notably Linux, don't.

* config/tc-ppc.h (md_reg_eh_frame_to_debug_frame): Match current
gcc behaviour.
* config/te-aix.h: New file.
* configure.tgt: Use em=aix for powerpc-aix.

7 years agoSet bfd_error in _bfd_elf_adjust_dynamic_copy
Alan Modra [Fri, 12 Dec 2014 13:09:14 +0000 (23:39 +1030)] 
Set bfd_error in _bfd_elf_adjust_dynamic_copy

PR 15228
* elflink.c (_bfd_elf_adjust_dynamic_copy): Call bfd_set_error.

7 years agoCopy relocations against protected symbols
Alan Modra [Fri, 12 Dec 2014 12:23:46 +0000 (22:53 +1030)] 
Copy relocations against protected symbols

Copy relocs are used in a scheme to avoid dynamic text relocations in
non-PIC executables that refer to variables defined in shared
libraries.  The idea is to have the linker define any such variable in
the executable, with a copy reloc copying the initial value, then have
both the executable and shared library refer to the executable copy.
If the shared library defines the variable as protected then we have
two copies of the variable being used.

PR 15228
* elflink.c (_bfd_elf_adjust_dynamic_copy): Add "info" param.
Error on copy relocs against protected symbols.
(elf_merge_st_other): Set h->protected_def.
* elf-bfd.h (struct elf_link_hash_entry): Add "protected_def".
(_bfd_elf_adjust_dynamic_copy): Update prototype.
* elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Update
_bfd_elf_adjust_dynamic_copy call.
* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
* elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
* elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
* elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
* elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
* elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
* elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
* elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
* elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
* elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
* elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
* elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
* elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.

7 years agoUse autoconf check for long long in binutils
Alan Modra [Thu, 11 Dec 2014 05:32:35 +0000 (16:02 +1030)] 
Use autoconf check for long long in binutils

* configure.ac: Check for long long and sizes of long long and long.
* elfcomm.h (HOST_WIDEST_INT): Test HAVE_LONG_LONG in place of
__STDC_VERSION__ and __GNUC__.
* strings.c (print_strings): Likewise.
* dwarf.c (DWARF_VMA_FMT, DWARF_VMA_FMT_LONG): Likewise.
* configure: Regenerate.
* config.in: Regenerate.

7 years agoDon't return DW_AT_name for function name in C++
Alan Modra [Tue, 9 Dec 2014 23:21:56 +0000 (09:51 +1030)] 
Don't return DW_AT_name for function name in C++

DW_AT_name for functions typically just contains the base function
name, so lacks namespace, class and parameter information.  It would
be possible to extract all these from the DWARF, but at a considerable
complication of the parser in dwarf2.c, and then you'd need to mangle
it all together.  Much simpler is to look up the actual symbol.  This
patch does that, avoiding the extra symbol lookup when the language
doesn't do name mangling.

PR 17541
* dwarf2.c (struct comp_unit): Add "lang".
(non_mangled): New function.
(struct funcinfo): Add "is_linkage".  Reorder for better packing.
Make "name" a const char*.
(lookup_address_in_function_table): Delete functionname_ptr param.
(find_abstract_instance_name): Add is_linkage param.  Set if we
have DW_AT_linkage_name or non_mangled DW_AT_name.
(scan_unit_for_symbols): Similarly set func->is_linkage.
(parse_comp_unit): Stash DW_AT_language.
(comp_unit_find_nearest_line): Replace functionname_ptr param
with function_ptr param.
(_bfd_dwarf2_find_nearest_line): Adjust above calls.  Set
functionname_ptr from function->name.  Call _bfd_elf_find_function
to retrieve symbol for function if not linkage name.
(_bfd_elf_find_function): Add bfd_target_elf_flavour test, moved from..
* elf.c (elf_find_function): ..here.
(_bfd_elf_find_nearest_line): Adjust calls.
* elf-bfd.h (_bfd_elf_find_function): Declare.

7 years agoDon't sort ld -r relocs for mips
Alan Modra [Tue, 9 Dec 2014 04:02:22 +0000 (14:32 +1030)] 
Don't sort ld -r relocs for mips

HI16/LO16 are deliberately put adjacent, which might mean relocs are
then not sorted by r_offset.  See tc-mips.c:mips_frob_file.  Don't undo
the HI16/LO16 sorting.

PR 17666
* elf-bfd.h (struct elf_backend_data): Add sort_relocs_p.
* elfxx-target.h (elf_backend_sort_relocs_p): Define.
(elfNN_bed): Init new field.
* elflink.c (elf_link_adjust_relocs): Conditionally sort.
(bfd_elf_final_link): Control sorting of relocs.
* elfxx-mips.c (_bfd_mips_elf_sort_relocs_p): New function.
* elfxx-mips.h (_bfd_mips_elf_sort_relocs_p): Declare.
* elf32-mips.c (elf_backend_sort_relocs_p): Define.
* elf64-mips.c (elf_backend_sort_relocs_p): Define.

7 years agoppc64_elf_edit_opd revamp, take 2
Alan Modra [Tue, 9 Dec 2014 04:01:01 +0000 (14:31 +1030)] 
ppc64_elf_edit_opd revamp, take 2

Now that ld -r relocs are sorted by the pr17666 fix, there isn't so
much need to sort incoming relocs.

* elf64-ppc.c (sort_r_offset): Delete.
(ppc64_elf_edit_opd): Don't sort input relocs.

7 years agoSort relocs output by ld -r
Alan Modra [Wed, 3 Dec 2014 11:30:18 +0000 (22:00 +1030)] 
Sort relocs output by ld -r

bfd/
PR 17666
* elflink.c: Include bfd_stdint.h.
(cmp_ext32l_r_offset, cmp_ext32b_r_offset,
cmp_ext64l_r_offset, cmp_ext64b_r_offset): New functions.
(elf_link_adjust_relocs): Sort relocs.  Free reloc hashes after
sorting invalidates.
ld/testsuite/
* ld-powerpc/vxworks-relax.rd: Update for reloc sorting.
* ld-powerpc/vxworks-relax-2.rd: Likewise.
* ld-sh/sh64/reldl32.rd: Likewise.
* ld-sh/sh64/reldl64.rd: Likewise.

7 years agoppc64_elf_edit_opd revamp
Alan Modra [Tue, 2 Dec 2014 04:39:16 +0000 (15:09 +1030)] 
ppc64_elf_edit_opd revamp

This patch sorts .opd relocs (see pr17666) and allows .opd sections
with a mix of 16 and 24 byte entries to be edited.

* elf64-ppc.c (OPD_NDX): Define.  Use throughout for sizing/indexing
_opd_sec_data array, halving required memory.
(sort_r_offset): New function.
(ppc64_elf_edit_opd): Sort incoming relocs.  Accept .opd
sections with a mix of 16 and 24 byte OPD entries.  Don't
attempt to honour --non-overlapping-opd for .opd sections with
unexpected relocs.  Simplify opd entry size calculations by
first finding the reloc for the next entry.  Make edit loop
handle one opd entry per iteration, with an inner loop
handling relocs per entry.

7 years agodwarf.c handle new DWARFv5 C11, C++11 and C++14 DW_LANG constants.
Mark Wielaard [Mon, 24 Nov 2014 20:24:25 +0000 (21:24 +0100)] 
dwarf.c handle new DWARFv5 C11, C++11 and C++14 DW_LANG constants.

binutils/ChangeLog

* dwarf.c (read_and_display_attr_value): Handle DW_LANG_C11,
DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14.

7 years agoRecognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.
Mark Wielaard [Mon, 24 Nov 2014 19:51:06 +0000 (20:51 +0100)] 
Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.

include/ChangeLog

* dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
DW_LANG_C_plus_plus_14.

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Feb 2015 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Feb 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Feb 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Feb 2015 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Feb 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Feb 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Feb 2015 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Feb 2015 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Feb 2015 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Feb 2015 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Feb 2015 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 31 Jan 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Jan 2015 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 29 Jan 2015 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years ago[ARM] Backport vcmp/vcmpe should accept #0x0 as an operand
Jiong Wang [Wed, 28 Jan 2015 09:55:51 +0000 (09:55 +0000)] 
[ARM] Backport vcmp/vcmpe should accept #0x0 as an operand

  gas/
  2015-01-28  Matthew Wahab  <matthew.wahab@arm.com>

    * config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for
    #0, restoring previous behaviour.

  testsuite/
  2015-01-28  Matthew Wahab  <matthew.wahab@arm.com>

    * gas/arm/ual-vcmp.s: Add vcmp, vcmpe with #0x0 operand.
    * gas/ual/vcmp.d: Update expected output.
    * gas/ual/vcmp-zero-bad.l: Likewise

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Jan 2015 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Jan 2015 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Jan 2015 00:04:21 +0000 (00:04 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Jan 2015 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Jan 2015 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Jan 2015 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoBackport from master:
Terry Guo [Thu, 22 Jan 2015 08:34:44 +0000 (16:34 +0800)] 
Backport from master:

bfd/ChangeLog:
2015-01-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

Backport from mainline
2015-01-13  Thomas Preud'homme <thomas.preudhomme@arm.com>

* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
SYMBOLIC_BIND to check if a symbol should be bound symbolically.

ld/testsuite/ChangeLog:
2015-01-22  Thomas Preud'homme <thomas.preudhomme@arm.com>

Backport from mainline
2015-01-13  Thomas Preud'homme <thomas.preudhomme@arm.com>

* ld-aarch64/aarch64-elf.exp: Added relocs-257-symbolic-func
test.
* ld-aarch64/relocs-257-symbolic-func.d: New file.
* ld-aarch64/relocs-257-symbolic-func.s: Likewise.

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Jan 2015 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Jan 2015 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoBackport from master:
Chung-Lin Tang [Tue, 20 Jan 2015 04:26:39 +0000 (20:26 -0800)] 
Backport from master:

Define elf_backend_default_execstack as 0 for Nios II.

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Jan 2015 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Jan 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Jan 2015 00:02:20 +0000 (00:02 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Jan 2015 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Jan 2015 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Jan 2015 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Jan 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Jan 2015 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Jan 2015 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoOnly discard space for pc-relative relocs symbols
H.J. Lu [Sun, 11 Jan 2015 16:04:27 +0000 (08:04 -0800)] 
Only discard space for pc-relative relocs symbols

When building PIE, we should only discard space for pc-relative relocs
symbols which turn out to need copy relocs.

bfd/

PR ld/17827
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
only discard space for pc-relative relocs symbols which turn
out to need copy relocs.

ld/testsuite/

PR ld/17827
* ld-x86-64/pr17689.out: Updated.
* ld-x86-64/pr17689b.S: Likewise.

* ld-x86-64/pr17827.rd: New file.

* ld-x86-64/x86-64.exp: Run PR ld/17827 test.

7 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Jan 2015 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Jan 2015 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Jan 2015 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Jan 2015 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoHandle stack split for x32
H.J. Lu [Thu, 18 Dec 2014 19:09:28 +0000 (11:09 -0800)] 
Handle stack split for x32

X32 uses cmp %fs:NN,%esp, lea NN(%rsp),%r10d, lea NN(%rsp),%r11d,
instead of cmp %fs:NN,%rsp, lea NN(%rsp),%r10, lea NN(%rsp),%r11.
This patch handles it.

PR gold/17729
* configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32.
(DEFAULT_TARGET_X32): Set for x32.
* x86_64.cc (cmp_insn_32): New.
(lea_r10_insn_32): Likewise.
(lea_r11_insn_32): Likewise.
(cmp_insn_64): Likewise.
(lea_r10_insn_64): Likewise.
(lea_r11_insn_64): Likewise.
(Target_x86_64<size>::do_calls_non_split): Handle x32.
* testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh.
(check_DATA): Add split_x32 files.
(split_x32_[1234n].o): New targets.
(split_x32_[124]): New targets.
(split_x32_[1234r].stdout): New targets.
* testsuite/split_x32.sh: New file.
* testsuite/split_x32_1.s: Likewise.
* testsuite/split_x32_2.s: Likewise.
* testsuite/split_x32_3.s: Likewise.
* testsuite/split_x32_4.s: Likewise.
* testsuite/split_x32_n.s: Likewise.
* configure: Regenerated.
* testsuite/Makefile.in: Likewise.

7 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Jan 2015 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 years agoHandle Initial-Exec to Local-Exec for x32
H.J. Lu [Tue, 6 Jan 2015 20:58:54 +0000 (12:58 -0800)] 
Handle Initial-Exec to Local-Exec for x32

PR gold/17809
* x86_64.cc (Target_x86_64<size>::Relocate::tls_ie_to_le): Handle
x32.

7 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Jan 2015 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoCreate ChangeLog.linaro files for backports, and fix ChangeLog files.
Adhemerval Zanella [Thu, 20 Oct 2016 14:57:41 +0000 (12:57 -0200)] 
Create ChangeLog.linaro files for backports, and fix ChangeLog files.

7 years agobfd/version.h: Increment Linaro version to 2016_02 to reflect commits in 2016.01
Ryan S. Arnold [Fri, 1 Jul 2016 22:10:27 +0000 (17:10 -0500)] 
bfd/version.h: Increment Linaro version to 2016_02 to reflect commits in 2016.01

7 years ago[ARM] Support ARMv8.2 RAS extension.
Matthew Wahab [Tue, 12 Jan 2016 16:35:30 +0000 (16:35 +0000)] 
[ARM] Support ARMv8.2 RAS extension.

The ARMv8.2 architecture includes the RAS extension which adds an
instruction, ESB, and a number of coprocessor registers. This patch adds
the instruction to binutils, making it available when -march=armv8.2-a
is selected. It also adds tests for the instruction and for the
coprocessor registers.

gas/
2016-01-12  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-arm.c (arm_ext_v8_2): New.
(insns): Add "esb".
* testsuite/gas/arm/armv8_2-a.d: New.
* testsuite/gas/arm/armv8_2-a.s: New.

opcodes/
2016-01-12  Matthew Wahab  <matthew.wahab@arm.com>

* arm-dis.c (arm_opcodes): Add "esb".
(thumb_opcodes): Likewise.

Change-Id: I67f3d70789db78d1c66a56c4994675f99ac15e34

7 years agoFix ldah being disassembled as ldaexh
Andre Vieira [Wed, 25 Nov 2015 13:56:55 +0000 (13:56 +0000)] 
Fix ldah being disassembled as ldaexh

2015-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>

opcodes/
    * arm-dis.c (arm_opcodes): <ldaexh>: Fix typo...
    <ldah>: ... to this.

gas/testsuite/
    * gas/arm/armv8-a.d: <ldaexh>: Rename mismatched mnemonics ...
    <ldah>: ... to this.

7 years ago[ARM] Enable CRC by default for ARMv8.1 and later.
Matthew Wahab [Tue, 15 Dec 2015 16:37:38 +0000 (16:37 +0000)] 
[ARM] Enable CRC by default for ARMv8.1 and later.

ARMv8.1 includes CRC as a required extension but the +crc feature isn't
enabled by -march=armv8.1-a as it should be. This patch fixes that.

opcode/include
2015-12-15  Matthew Wahab  <matthew.wahab@arm.com>

* arm.h (ARM_ARCH_V8_1A): Add the CRC_EXT_ARMV8 co-processor
feature macro.
(ARM_ARCH_V8_2A): Likewise.

Change-Id: Id1fe0e6fa51dede19d61e1fd08e68628ea1b1e9e

7 years agoFixes a compile time warnng about left shifting a negative value.
Szabolcs Nagy [Tue, 16 Jun 2015 12:35:33 +0000 (13:35 +0100)] 
Fixes a compile time warnng about left shifting a negative value.

* arm-dis.c (print_insn_coprocessor): Avoid negative shift.

7 years ago[AArch64][Patch 5/5] Add instruction PSB CSYNC
Matthew Wahab [Fri, 11 Dec 2015 10:22:40 +0000 (10:22 +0000)] 
[AArch64][Patch 5/5] Add instruction PSB CSYNC

The Statistical Profile Extension adds the instruction PSB CSYNC as an
alias for the HINT #17 instruction. This patch adds the instruction to
binutils as a HINT alias that takes an operand.

A new operand type, AARCH64_OPND_BARRIER_PSB, is added to represent the
operand to PSB. A parser for the operand type is added to the assembler
and a printer to the disassembler. The operand name "csync" is added to
the list of HINT options with HINT number #17. Encoding and decoding of
the operand is handled by the ins_hint/ext_hint functions added in the
preceding patches.

gas/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_hint_opt_hsh): New.
(parse_barrier_psb): New.
(parse_operands): Add case for AARCH64_OPND_BARRIER_PSB.
(md_begin): Set up aarch64_hint_opt_hsh.

gas/testsuite/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/system-2.d: Enable the statistical profiling
extension.  Update the expected output.
* gas/aarch64/system-2.s: Add tests for PSB CSYNC.
* gas/aarch64/system.d: Update the expected output.

include/opcode/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (aarch64_opnd): Add AARCH64_OPND_BARRIER_PSB.
* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.
* aarch64-opc.c (aarch64_hint_options): Add "csync".
(aarch64_print_operands): Handle AARCH64_OPND_BARRIER_PSB.
* aarch64-tbl.h (aarch64_feature_stat_profile): New.
(STAT_PROFILE): New.
(aarch64_opcode_table): Add "psb".
(AARCH64_OPERANDS): Add "BARRIER_PSB".

Change-Id: I5ffb672d26a8b15b48785478d359350a9b70ca09

7 years ago[AArch64][Patch 4/5] Support HINT aliases taking operands.
Matthew Wahab [Fri, 11 Dec 2015 10:11:27 +0000 (10:11 +0000)] 
[AArch64][Patch 4/5] Support HINT aliases taking operands.

The Statistical Profile Extension adds the instruction PSB CSYNC as an
alias for the HINT #17 instruction. This patch adds support for aliases
of HINT which take an operand, adding a table to store operand names and
their matching hint number as well as encoding and decoding functions
for such operands. Parsing and printing the operands are deferred to any
support added for aliases with such operands.

include/opcode/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (aarch64_hint_options): Declare.
(aarch64_opnd_info): Add field hint_option.

opcodes/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm.c (aarch64_ins_hint): New.
* aarch64-asm.h (aarch64_ins_hint): Declare.
* aarch64-dis.c (aarch64_ext_hint): New.
* aarch64-dis.h (aarch64_ext_hint): Declare.
* aarch64-opc-2.c: Regenerate.
* aarch64-opc.c (aarch64_hint_options): New.
* aarch64-tbl.h (AARCH64_OPERANDS): Fix typos.

Change-Id: I2205038fc1c47d3025d1f0bc2fbf405b5575b287

7 years ago[AArch64][Patch 3/5] Adjust maximum number of instruction aliases.
Matthew Wahab [Fri, 11 Dec 2015 09:56:07 +0000 (09:56 +0000)] 
[AArch64][Patch 3/5] Adjust maximum number of instruction aliases.

The Statistical Profile Extension adds the instruction PSB CSYNC as an
alias for the HINT #17 instruction. The HINT instruction currently has 8
aliases, which is the maximum number allowed. This patch raises to 16
the limit on the number of aliases an instruction can have.

opcodes/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-gen.c (find_alias_opcode): Set max_num_aliases to 16.

Change-Id: I131044bf6e0fe0940a9e7478d9bf52137748907d

7 years ago[AArch64][Patch 2/5] Add Statistical Profiling Extension system registers.
Matthew Wahab [Fri, 11 Dec 2015 09:52:11 +0000 (09:52 +0000)] 
[AArch64][Patch 2/5] Add Statistical Profiling Extension system registers.

The Statistical Profile extension included in the ARMv8.2 architecture
adds a number of system registers. This patch adds the registers to
binutils, making them available when the architecture extension
"+profile" is enabled.

opcodes/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_reg): Add pbmlimitr_el1, pmbptr_el1,
pmbsr_el1, pmbidr_el1, pmscr_el1, pmsicr_el1, pmsirr_el1,
pmsfcr_el1, pmsevfr_el1, pmslatfr_el1, pmsidr_el1, pmscr_el2 and
pmscr_el2.
(aarch64_sys_reg_supported_p): Add architecture feature tests for
the new registers.

gas/testsuite/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.s: Add tests for the statistical profiling
system registers.
* gas/aarch64/sysreg-2.d: Enable the statistical profiling
extension and update the expected output.

Change-Id: Ibf23ad34db7c33f0fcd30010b796748b38be6efb

7 years ago[AArch64][Patch 1/5] Support the ARMv8.2 Statistical Profiling Extension.
Matthew Wahab [Fri, 11 Dec 2015 09:30:26 +0000 (09:30 +0000)] 
[AArch64][Patch 1/5] Support the ARMv8.2 Statistical Profiling Extension.

The Statistical Profile extension included in the ARMv8.2 architecture
adds a number of system registers and a new instruction. This patch set
adds support for the extension to binutils, enabled when
-march=armv8.2-a+profile is given.

The patches in this series:
- Add the new command line option and feature flags.
- Add the new system registers.
- Adjust the maximum number of aliases permitted for an instruction.
- Add support for HINT aliases which take operands.
- Add the new instruction, an alias of the HINT instruction.

This patch adds the option "profile" to the permitted architecture
extensions, disabling it by default.

gas/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_features): Add "profile".
* doc/c-aarch64.texi (AArch64 Extensions): Add "profile".

include/opcode/
2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_PROFILE): New.

Change-Id: If9bb4a9b69a264180f96f8ffaf10b15ced273699

7 years ago[Aarch64] Support ARMv8.2 AT instructions
Matthew Wahab [Thu, 10 Dec 2015 16:58:51 +0000 (16:58 +0000)] 
[Aarch64] Support ARMv8.2 AT instructions

ARMv8.2 adds new instructions AT S1E1RP and AT S1E1WP to Aarch64. This
patch adds support for the instructions, making them available when
-march=armv8.2-a is selected.

gas/testsuite/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.d: Update for new tests for AT S1E1RP and
AT S1E1WP.
* gas/aarch64/sysreg-2.s: Add tests for AT S1E1RP and AT S1E1WP.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs_at): Add "s1e1rp" and "s1e1wp".
(aarch64_sys_ins_reg_supported_p): Add ARMv8.2 system register
feature test for "s1e1rp" and "s1e1wp".

Change-Id: I09e1044b629ab0a34b03c423e8d4e71ff92daad4

7 years ago[AArch64][PATCH 2/2] Support ARMv8.2 DC CVAP instruction.
Matthew Wahab [Thu, 10 Dec 2015 16:38:44 +0000 (16:38 +0000)] 
[AArch64][PATCH 2/2] Support ARMv8.2 DC CVAP instruction.

ARMv8.2 adds the new system instruction DC CVAP. This patch adds support
for the instruction to binutils, enabled when -march=armv8.2-a is
selected.

gas/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (parse_sys_ins_reg): Add check of
architectural support for system register.

gas/testsuite/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.d: Add tests for dc instruction.
* gas/aarch64/sysreg-2.s: Add uses of dc instruction.

include/opcode/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (aarch64_sys_ins_reg_supported_p): Declare.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs_dc): Add "cvap".
(aarch64_sys_ins_reg_supported_p): New.

Change-Id: I3158b97d9bbee9644c2d0e2986db807412ef1053

7 years ago[AArch64][PATCH 1/2] Add support for ARMv8.2 DC CVAP instruction.
Matthew Wahab [Thu, 10 Dec 2015 16:31:35 +0000 (16:31 +0000)] 
[AArch64][PATCH 1/2] Add support for ARMv8.2 DC CVAP instruction.

ARMv8.2 adds the new system instruction DC CVAP. This patch series adds
support for this instruction to binutils, enabled when -march=armv8.2-a
is selected.

The AArch64 binutils record of some system registers uses a boolean
value to hold the single flag currently supported for them. To allow
these registers to be limited to specific architectures, the first patch
in this series replaces the boolean flag with a bitset and feature test.

include/opcode/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (aarch64_sys_ins_reg): Replace has_xt with flags.
(aarch64_sys_ins_reg_has_xt): Declare.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-dis.c (aarch64_ext_regrt_sysins): Replace use of has_xt
with aarch64_sys_ins_reg_has_xt.
(aarch64_ext_sysins_op): Likewise.
* aarch64-opc.c (operand_general_constraint_met_p): Likewise.
(F_HASXT): New.
(aarch64_sys_regs_ic): Update for changes to aarch64_sys_ins_reg.
(aarch64_sys_regs_dc): Likewise.
(aarch64_sys_regs_at): Likewise.
(aarch64_sys_regs_tlbi): Likewise.
(aarch64_sys_ins_reg_has_xt): New.

Change-Id: I363637a6c3f54d7ffff953b3a0734e8139cae819

7 years ago[AArch64][binutils] Add support for ARMv8.2 PSTATE.UAO.
Matthew Wahab [Thu, 10 Dec 2015 16:01:29 +0000 (16:01 +0000)] 
[AArch64][binutils] Add support for ARMv8.2 PSTATE.UAO.

ARMv8.2 adds a new control bit PSTATE.UAO. This patch adds support for
this bit to binutils, following the same basic pattern as for
PSTATE.PAN. The new control bit is only available when -march=armv8.2-a
is specified.

gas/testsuite/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/uao-directive.d: New.
* gas/aarch64/uao.d: New.
* gas/aarch64/uao.s: New.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add "uao".
(aarch64_sys_reg_supported_p): Add comment.  Add checks for "uao".
(aarch64_pstatefields): Add "uao".
(aarch64_pstatefield_supported_p): Add checks for "uao".

Change-Id: Id571628ac5227b78aaf1876e85d15d7b6c0a2896

7 years ago[AArch64][PATCH 2/2] Add RAS system registers.
Matthew Wahab [Thu, 10 Dec 2015 14:09:03 +0000 (14:09 +0000)] 
[AArch64][PATCH 2/2] Add RAS system registers.

The ARMv8.2 RAS extension adds a number of new registers. This patch
adds the registers and makes them available whenever the RAS extension
is enabled, as it is when -march=armv8.2-a is selected.

The new registers are:
    erridr_el1, errselr_el1, erxfr_el1, erxctlr, erxaddr_el1,
    erxmisc0_el1, erxmisc1_el1, vsesr_el2, disr_el1 and
    vdisr_el2.

gas/testsuite/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.d: Add tests for new registers.
* gas/aarch64/sysreg-2.s: Likewise.  Also replace some spaces with
tabs.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add "vsesr_el2", "erridr_el1",
"errselr_el1", "erxfr_el1", "erxctlr", "erxaddr_el1",
"erxmisc0_el1", "erxmisc1_el1", "disr_el1" and "vdisr_el2".
(aarch64_sys_reg_supported_p): Add architecture feature tests for
new registers.

Change-Id: I8a01a0f0ee7987f89eead32650f6afcc749b3c74

7 years ago[AArch64][PATCH 1/2] Add support for RAS instruction ESB.
Matthew Wahab [Thu, 10 Dec 2015 14:05:01 +0000 (14:05 +0000)] 
[AArch64][PATCH 1/2] Add support for RAS instruction ESB.

The ARMv8.2 RAS extension adds a new barrier instruction ESB as an alias
and the preferred form of HINT 16.

This patch adds an architectural feature flag for the RAS extension and
includes it in the features selected enabled by -march=armv8.2-a. It
also adds the ESB instruction, making it available whenever the RAS
feature is enabled.

Because ESB is the preferred form and because the target architecture
isn't available to the disassembler, HINT 16 will be disassembled as ESB
even when the target has no support for the RAS extension.

gas/testsuite/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/system-2.d: New.
* gas/aarch64/system-2.s: New.
* gas/aarch64/system.d: Adjust expected output for HINT 16.

include/opcode/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_RAS): New.
(AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_RAS.

opcodes/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-tbl.h (aarch64_feature_ras): New.
(RAS): New.
(aarch64_opcode_table): Add "esb".

Change-Id: Id4713917da15cca3b977284f43febd1c9b3d9faf

7 years ago[AArch64] Fix ARMv8.1 and ARMv8.2 feature settings.
Matthew Wahab [Thu, 10 Dec 2015 13:58:21 +0000 (13:58 +0000)] 
[AArch64] Fix ARMv8.1 and ARMv8.2 feature settings.

ARMv8.1 includes CRC as a required extension but this isn't reflected in
the features enabled by -march=armv8.1-a. The FP16 feature modifier also
clashes with AARCH64_FEATURE_V8_1 and the list of features for ARMv8.2
is missing ARMv8.1 features.

This patch enables +crc for -march values of armv8.1-a and later. It
also fixes the values for AARCH64_FEATURE_F16 and makes
AARCH64_ARCH_V8_2 and superset of AARCH64_ARCH_V8_2.

gas/
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* doc/c-aarch64.texi (AArch64 Extensions): Update entry for crc.

include/opcode
2015-12-10  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_F16): Fix clash with
AARCH64_FEATURE_V8_1.
(AARCH64_ARCH_V8_1): Add AARCH64_FEATURE_CRC.
(AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_CRC and
AARCH64_FEATURE_V8_1.

Change-Id: I8af5369f6df2430b28f6cec92870d2a4d14a7431

7 years ago[AArch64][PATCH 3/3] Add floating-point FP16 instructions
Matthew Wahab [Fri, 27 Nov 2015 16:32:21 +0000 (16:32 +0000)] 
[AArch64][PATCH 3/3] Add floating-point FP16 instructions

ARMv8.2 adds 16-bit floating point operations as an optional extension
to the ARMv8 FP support. This patch adds the new FP16 instructions,
making them available when the architecture extension +fp+fp16 is
specified.

The instructions added are:

- Comparisons and conditionals: FCMP, FCCMPE, FCMP, FCMPE and FCSEL.
- Arithmetic: FABS, FNEG, FSQRT, FMUL, FDIV, FADD, FSUB, FMADD, FMSUB,
  FNMADD and FNMSUB.
- Rounding: FRINTN, FRINTP, FRINTM, FRINTZ, FRINTA, FRINTX and FRINTI.
- Conversions: SCVTF (fixed-point), SCVTF (integer), UCVTF (fixed-point)
  UCVTF (integer), FCVTZS (fixed-point), FCVTZS (integer), FCVTZU
  (fixed-point), FCVTZU (integer), FCVTNS, FCVTNU, FCVTAS, FCVTAU,
  FCVTPS, FCVTPU, FCVTMS and  FCVTMU.
- Scalar FMOV: immediate, general and register

gas/testsuite/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/float-fp16.d: New.
* gas/aarch64/float-fp16.s: New.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.
* aarch64-tbl.h (QL_FIX2FP_H, QL_FP2FIX_H): New.
(QL_INT2FP_H, QL_FP2INT_H): New.
(QL_FP2_H, QL_FP3_H, QL_FP4_H): New
(QL_DST_H): New.
(QL_FCCMP_H): New.
(aarch64_opcode_table): Add 16-bit variants of scvt, ucvtf,
fcvtzs, fcvtzu, fcvtns, fcvtnu, scvtf, ucvtf, fcvtas, fcvtau,
fmov, fcvtpos, fcvtpu, fcvtms, fcvtmu, fcvtzs, fcvtzu, fccmp,
fccmpe, fcmp, fcmpe, fabs, fneg, fsqrt, frintn, frintp, frintm,
frintz, frinta, frintx, frinti, fmul, fdiv, fadd, fsub, fmax,
fmin, fmaxnm, fminnm, fnmul, fmadd, fmsub, fnmadd, fnmsub and
fcsel.

Change-Id: Ie6d40bd1b215a9bc024e12ba75e52afbe1675eb7

7 years ago[AArch64][PATCH 2/3] Adjust a utility function for floating point values.
Matthew Wahab [Fri, 27 Nov 2015 16:25:52 +0000 (16:25 +0000)] 
[AArch64][PATCH 2/3] Adjust a utility function for floating point values.

ARMv8.2 adds 16-bit floating point operations as an optional
extension. This patch adjusts the utility function expand_fp_imm to
support 16-bit values.

The function is intended to convert an 8-bit immediate representing a
floating point value to a representation that can be passed to
fprintf. Because of the limited use of the results, the only change made
to the function is to treat a request for a 16-bit float as a request
for a 32-bit float.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (half_conv_t): New.
(expand_fp_imm): Replace is_dp flag with the parameter size to
specify the number of bytes for the required expansion.  Treat
a 16-bit expansion like a 32-bit expansion.  Add check for an
unsupported size request.  Update comment.
(aarch64_print_operand): Update to support 16-bit floating point
values.  Update for changes to expand_fp_imm.

Change-Id: I1ae3df3864be375d71925197ab03397ed1ad2d15

7 years ago[AArch64][PATCH 1/3] Support ARMv8.2 FP16 floating point instructions.
Matthew Wahab [Fri, 27 Nov 2015 15:47:53 +0000 (15:47 +0000)] 
[AArch64][PATCH 1/3] Support ARMv8.2 FP16 floating point instructions.

ARMv8.2 adds 16-bit floating point operations as an optional extension
to the ARMv8 FP support. This patch set adds support for the 16-bit FP
instructions to binutils, enabling the instructions when both +fp and
+fp16 architecture extensions are enabled.

The patches in this series:
- Add a feature macro for use by the encoding/decoding mechanism.
- Adjust a utility function, used when disassembling, to support 16-bit
  floating point values.
- Add the new scalar floating-point instructions.

This patch adds the feature macro FP_F16 to the AArch64 encoding/decoding
mechanism, enabling it when both +fp and +fp16 are selected.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-tbl.h (aarch64_feature_fp_f16): New.
(FP_F16): New.

Change-Id: Ie370e43e3d77a7d54b4416b4be901b363a37f3d5

7 years ago[AArch64] Add ARMv8.2 instruction alias REV64.
Matthew Wahab [Fri, 27 Nov 2015 15:39:12 +0000 (15:39 +0000)] 
[AArch64] Add ARMv8.2 instruction alias REV64.

This patch adds the alias REV64 <Rd>, <Rs> as an alias for REV <Rd>,
<Rs>. However, REV is still the preferred form for the instruction.

gas/testsuite/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/alias-2.d: Add tests for REV.
* gas/aarch64/alias-2.s: Likewise.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.
* aarch64-tbl.h (aarchr64_opcode_table): Update "rev", add
"rev64".

Change-Id: I331567c8d3618ba9fec1673c6e0b5977222dde61

7 years ago[AArch64] Add ARMv8.2 instructions BFC and REV64.
Matthew Wahab [Fri, 27 Nov 2015 15:25:08 +0000 (15:25 +0000)] 
[AArch64] Add ARMv8.2 instructions BFC and REV64.

ARMv8.2 adds two new instructions: BFC as an alias for BFM and REV64 as
an alias for REV. This patch set adds support for these to binutils,
enabled when the -march=armv8.2-a is given. It depends on the support
for an instruction being its preferred form which was added in an
earlier patch.

This patch adds the alias BFC <Rd>, #<imm>, #<width> as the preferred
form for BFM when the source is a zero register and the conditions for
using the BFI form are met (in other words, BFC is the preferred form
for BFI <Rd>, <Rs>, #<imm>, #<width> when the <Rs> is a zero register).

gas/testsuite/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/alias-2.d: New.
* gas/aarch64/alias-2.s: New.

include/opcode/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (aarch64_op): Add OP_BFC.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-asm.c (convert_bfc_to_bfm): New.
(convert_to_real): Add case for OP_BFC.
* aarch64-dis-2.c: Regenerate.
* aarch64-dis.c: (convert_bfm_to_bfc): New.
(convert_to_alias): Add case for OP_BFC.
* aarch64-opc-2.c: Regenerate.
* aarch64-opc.c (operand_general_constraint_met_p): Weaken assert
to allow width operand in three-operand instructions.
* aarch64-tbl.h (QL_BF1): New.
(aarch64_feature_v8_2): New.
(ARMV8_2): New.
(aarch64_opcode_table): Add "bfc".

Change-Id: I6efe318b2538ba11f0caece7c6d70957441c872b

7 years ago[AArch64] Let aliased instructions be their preferred form.
Matthew Wahab [Fri, 27 Nov 2015 15:02:26 +0000 (15:02 +0000)] 
[AArch64] Let aliased instructions be their preferred form.

Although the AArch64 backend supports aliased instructions, the aliasing
forms are always preferred over the real instruction. This makes it
awkward to handle instructions which have aliases but which are their
own preferred form.

This patch includes the instruction being aliased in the list of
alternatives which is searched when considering which form to use.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-dis.c: Weaken assert.
* aarch64-gen.c: Include the instruction in the list of its
possible aliases.

Change-Id: I1f23eb25fccef76a64d3d732d58761bd25fad94e

7 years ago[Aarch64] Support an ARMv8.2 system register.
Matthew Wahab [Fri, 27 Nov 2015 13:44:10 +0000 (13:44 +0000)] 
[Aarch64] Support an ARMv8.2 system register.

ARMv8.2 adds a new system register id_aa64mmfr2_el1. This patch adds
support for the register to binutils, making it available when
-march=armv8.2-a is selected.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add "id_aa64mmfr2_el1".
(aarch64_sys_reg_supported_p): Add ARMv8.2 system register
feature test.

gas/testsuite/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.d: New.
* gas/aarch64/sysreg-2.s: New.

Change-Id: I767f18a60e2bd70ce74c89f6abfe07afdc9e601f

7 years ago[AArch64] Add feature flags and command line for ARMv8.2 FP16 support.
Matthew Wahab [Fri, 27 Nov 2015 13:19:50 +0000 (13:19 +0000)] 
[AArch64] Add feature flags and command line for ARMv8.2 FP16 support.

ARMv8.2 adds optional support for 16-bit operations to the FP and
Adv.SIMD instructions. This patch adds a feature macro for this support
with a new command line option "+fp16" to enable/disable it.

Although the command line option is added as an architecture extension,
it only affects instructions available with when +fp or +simd is
enabled. If +fp16 is specified then it will also enable +fp.

There are currently no FP16 instructions implemented in binutils, this
patch is to enable subsequent work on supporting the extension.

gas/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_features): Add "fp16".
* doc/c-aarch64.texi (Architecture Extensions): Add "fp16".

include/opcode/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_F16): New.
(AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_F16 to ARMv8.2
features.

Change-Id: Id2021e0513946e16d0935c2a5b9605574cdff95a

7 years ago[AArch64] Add support for ARMv8.1 Virtulization Host Extensions.
Matthew Wahab [Fri, 20 Nov 2015 16:09:34 +0000 (16:09 +0000)] 
[AArch64] Add support for ARMv8.1 Virtulization Host Extensions.

The ARMv8.1 architecture includes the Virtualization Host Extensions
which add a number of system registers. This patch adds support for
these system registers, making them available when -march=armv8.1-a is
selected.

include/opcode/
2015-11-20  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_V8_1): New.
(AARCH64_ARCH_v8_1): Add AARCH64_FEATURE_V8_1.

opcodes/
2015-11-20  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add spsr_el12, elr_el12,
sctlr_el12, cpacr_el12, ttbr1_el2, ttbr0_el12, ttbr1_el12,
tcr_el12, afsr0_el12, afsr1_el12, esr_el12, far_el12, mair_el12,
amair_el12, vbar_el12, contextidr_el2, contextidr_el12,
cntkctl_el12, cntp_tval_el02, cntp_ctl_el02, cntp_cval_el02,
cntv_tval_el02, cntv_ctl_el02, cntv_cval_el02, cnthv_tval_el2,
cnthv_ctl_el2, cnthv_cval_el2.
(aarch64_sys_reg_supported_p): Update for the new system
registers.

gas/testsuite/
2015-11-20  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/virthostext-directive.d: New.
* gas/aarch64/virthostext.d: New.
* gas/aarch64/virthostext.s: New.

Change-Id: Iecb370591b1b6e9e00d81c8ccd9ae3b0f71794a2

7 years ago[ARM] Add ARMv8.2 architecture feature and command line option.
Matthew Wahab [Thu, 19 Nov 2015 09:24:14 +0000 (09:24 +0000)] 
[ARM] Add ARMv8.2 architecture feature and command line option.

ARMv8.2 is an architectural extension of ARMv8. This patch adds an
architecture feature macro for ARMv8.2 to the binutils ARM target
with GAS command line option -march=armv8.2-a.

gas/
2015-11-19  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-arm.c (arm_archs): Add "armv8.2-a".
* doc/c-arm.texi (-march): Add "armv8.2-a".

include/opcode/
2015-11-19  Matthew Wahab  <matthew.wahab@arm.com>

* arm.h (ARM_EXT2_V8_2A): New.
(ARM_ARCH_V8_2A): New.

Change-Id: I9e0f50e3c6cea24e6b87b8b862fd4e1cdcc1052e

7 years ago[AArch64] Add ARMv8.2 command line option and feature flag.
Matthew Wahab [Thu, 19 Nov 2015 09:12:49 +0000 (09:12 +0000)] 
[AArch64] Add ARMv8.2 command line option and feature flag.

ARMv8.2 is an architectural extension of ARMv8. This patch adds an
architecture feature macro for ARMv8.2 to the binutils AArch64 target
with GAS command line option -march=armv8.2-a.

gas/
2015-11-19  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_archs): Add "armv8.2-a".
* doc/c-aarch64.texi (-march): Likewise.

include/opcode/
2015-11-19  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_V8_2): New.
(AARCH64_ARCH_V8_2): New.

Change-Id: I129232ab00234a07d18ce4b619607344acb3cbaf

7 years ago[Patch ARM] Fix build attributes for armv8-a in case of assembler files that contain...
Ramana Radhakrishnan [Thu, 17 Dec 2015 10:55:54 +0000 (10:55 +0000)] 
[Patch ARM] Fix build attributes for armv8-a in case of assembler files that contain no directives.

There is currently a problem in the way in which we produce
build attributes for simple assembler files that have armv8-a
instructions.

In these case we need to generate TAG_ISA_THUMB_Use to be Thumb-2
and set the architecture profile to be 'A' rather than not
setting architecture profile to be 'A' and setting TAG_ISA_THUMB_Use
to be Thumb-1.

This is a pre-requisite for any v8-m patches that have been posted.
arm-none-eabi gas testsuite run. no regressions.

2015-12-17  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* gas/config/tc-arm.c (aeabi_set_public_attributes): Adjust
TAG_ARCH_profile for armv8-a.
* gas/testsuite/gas/arm/armv8a-automatic-hlt.d: New test.
* gas/testsuite/gas/arm/armv8a-automatic-hlt.s: New test.
* gas/testsuite/gas/arm/armv8a-automatic-lda.d: New test.
* gas/testsuite/gas/arm/armv8a-automatic-lda.s: New test.

7 years agoFix detection of GNU LD version in GCC's scripts
Maxim Kuvyrkov [Wed, 4 Nov 2015 13:52:34 +0000 (14:52 +0100)] 
Fix detection of GNU LD version in GCC's scripts

GCC's configure scripts are confused by YYYY.MM format of Linaro releases
and mistake YYYY for major version (currently 2) and MM for minor version
(currently 25).  This, in turn, makes GCC think that GNU LD doesn't support
plugins, which disables -fuse-linker-plugin functionality used by LTO.

This problem was already fixed before, and there is a comment about avoiding
"." in the BFD_VERSION_STRING, but, for reasons I can't explain, the problem
occurred again.  So fixing it ... again.

7 years agobfd/version.h: Update VERSION for 2.25 2015.10 release
Adhemerval Zanella [Tue, 6 Oct 2015 19:34:14 +0000 (19:34 +0000)] 
bfd/version.h: Update VERSION for 2.25 2015.10 release

7 years ago[AArch64] Fix function pointer variable with -Bsymbolic-functions
Jiong Wang [Tue, 13 Jan 2015 11:36:54 +0000 (11:36 +0000)] 
[AArch64] Fix function pointer variable with -Bsymbolic-functions

bfd/ChangeLog

2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>

    * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
    SYMBOLIC_BIND to check if a symbol should be bound symbolically.

ld/testsuite/ChangeLog

2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>

    * ld-aarch64/aarch64-elf.exp: Added relocs-257-symbolic-func test.
    * ld-aarch64/relocs-257-symbolic-func.d: New file.
    * ld-aarch64/relocs-257-symbolic-func.s: Likewise.

Change-Id: I892147fc9dea1dfc5d688ea90a7bbf912ab2d8ac

7 years agoFix broken -Bsymbolic-functions
Alan Modra [Sat, 25 Jul 2015 07:08:42 +0000 (16:38 +0930)] 
Fix broken -Bsymbolic-functions

For selected targets.  The testcase reveals a number of targets that
still need fixing.

bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
check if a symbol should be bound symbolically.
* elf32-hppa.c (elf32_hppa_check_relocs,
elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
elf32_hppa_finish_dynamic_symbol): Likewise.
* elf32-m68k.c (elf_m68k_check_relocs,
elf_m68k_relocate_section): Likewise.
* elf32-nios2.c (nios2_elf32_relocate_section,
nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
elf32_tic6x_relocate_section): Likewise.
ld/testsuite/
* ld-elf/symbolic-func.s,
* ld-elf/symbolic-func.r: New test.
* ld-elf/elf.exp: Run it.

Change-Id: Icf55fbc85d64ef220d212b8bff2181e0671415a7

7 years ago[ARM] Add crypto-neon-fp-armv8.1 as an fpu option
Matthew Wahab [Thu, 16 Jul 2015 14:11:30 +0000 (15:11 +0100)] 
[ARM] Add crypto-neon-fp-armv8.1 as an fpu option

2015-07-16  Matthew Wahab  <matthew.wahab@arm.com>

gas/
  * config/tc-arm.c (arm_fpus): Add crypto-neon-fp-armv8.1.
  * doc/c-arm.texi (-mfpu=): Likewise.  Correct the entry for
  neon-fp-armv8.1.

Change-Id: I0dd66a64d2027a948c256424cb7158d8d3025a2d

7 years ago[AArch64] Add support for ARMv8.1 command line option
Matthew Wahab [Thu, 4 Jun 2015 10:14:07 +0000 (11:14 +0100)] 
[AArch64] Add support for ARMv8.1 command line option

Change-Id: I0e9ad907d64ca64fcb2eda7d90e850a57348192a

7 years ago[ARM] Commit approaved testcases missed in previous commit
Matthew Wahab [Wed, 3 Jun 2015 09:52:34 +0000 (10:52 +0100)] 
[ARM] Commit approaved testcases missed in previous commit

2015-06-03  Matthew Wahab  <matthew.wahab@arm.com>

* gas/arm/armv8-a+rdma.d: New.
* gas/arm/armv8-a+rdma.s: New.

7 years ago[AArch64] Revert local changes included in Matthew's commit
Jiong Wang [Wed, 3 Jun 2015 09:06:42 +0000 (10:06 +0100)] 
[AArch64] Revert local changes included in Matthew's commit

When commit the following code for Matthew, I wrongly included my local changes. Revert it. Sorry.

commit a5932920ef397c2cbe02efa915686022b78d59a7
Author: Matthew Wahab <matthew.wahab@arm.com>
Date:   Wed Jun 3 10:03:50 2015 +0100

7 years ago[ARM] Support for ARMv8.1 command line option
Matthew Wahab [Wed, 3 Jun 2015 09:03:50 +0000 (10:03 +0100)] 
[ARM] Support for ARMv8.1 command line option

2015-06-03  Matthew Wahab  <matthew.wahab@arm.com>

gas/
* config/tc-arm.c (arm_archs): Add "armv8.1-a".
* doc/c-arm.texi (ARM Options, -march): Add "armv8.1-a".
* NEWS: Mention ARMv8.1 support.

include/opcode/
* arm.h (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): New.
(ARM_ARCH_V8_1A): New.
(ARM_ARCH_V8_1A_FP): New.
(ARM_ARCH_V8_1A_SIMD): New.
(ARM_ARCH_V8_1A_CRYPTOV1): New.
(ARM_FEATURE_CORE): New.

Change-Id: Iaa670f1c06dd40af79eba182663daf794d63edb5

7 years ago[ARM] Support for ARMv8.1 Adv.SIMD extension
Matthew Wahab [Tue, 2 Jun 2015 11:35:21 +0000 (12:35 +0100)] 
[ARM] Support for ARMv8.1 Adv.SIMD extension

Change-Id: Ib2beb4ae047a4f5edb04af794a17836f6229673f

7 years ago[ARM] Add support for ARMv8.1 PAN extension
Matthew Wahab [Tue, 2 Jun 2015 11:30:38 +0000 (12:30 +0100)] 
[ARM] Add support for ARMv8.1 PAN extension

Change-Id: I2fdfcca78ffa4acc26854429ccd7b939ef3819d9

7 years ago[ARM] Rework CPU feature selection in the disassembler
Matthew Wahab [Tue, 2 Jun 2015 11:24:24 +0000 (12:24 +0100)] 
[ARM] Rework CPU feature selection in the disassembler

include/opcode/
* arm.h (ARM_FEATURE_ALL): New.

opcodes/
* arm-dis.c (select_arm_features): Rework to avoid used of
redefined macros.

Change-Id: I55383e81473254b8dd31251634f7bd5af87d8a9d