public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  users/jkratoch/indexcxx: Merge remote-tracking branch 'gdb/master' into indexcxx
Date: Wed, 24 May 2017 07:20:00 -0000	[thread overview]
Message-ID: <20170524072026.76626.qmail@sourceware.org> (raw)

The branch, users/jkratoch/indexcxx has been updated
       via  480030250901adfbd6e8080e87143fc9959f372e (commit)
       via  60fd657792228e3eb59e87c26fcdeccbfe94d224 (commit)
       via  f7241d4f27cd59357a75bf802e9ffa7d95036deb (commit)
       via  d489d81d0934c4fda8c8aa68fbec1b1315cf8df0 (commit)
       via  6e92fed5946111a76064feb8a2a184d224deae1a (commit)
       via  590b87ffa386ea403e2cb61525c6aafef77097a2 (commit)
       via  6e3f3473e2136e77d6346d5bca894c38e5389116 (commit)
       via  8e7f04f17c60069143078dafd3d3eb8cd15f10fb (commit)
       via  575dcd27f8be6ecd3f89539a8210a8d3f0a271b1 (commit)
       via  903b2a564d78b8e47f2460a2a452f442e6e5e979 (commit)
       via  176efed15cabb932a7e9fb2c5e6ef0753e8351a0 (commit)
       via  04ef582ace91cad765d056cc95624478e0421144 (commit)
       via  25f94347373b1b6f4bfc79eeb38e79d383195779 (commit)
       via  9a6465c207ed4e34be92741316d78fc00f0836e4 (commit)
       via  3c0367d0e2df21717b7345a1ccadef39183457ab (commit)
       via  e11b3cdc565c5e86e43ef79d25fc5e8b88162ec1 (commit)
       via  0f068fb5e5b65038c3ded3cfd2a4b8805196956c (commit)
       via  ca49a96781f723d43ec49471cbbb50aa511d063e (commit)
       via  e6cf65f283b8be44014fad0ad0aebfbcc71fceac (commit)
      from  3c31c689159535ec278253668e1f59155f18da2b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 480030250901adfbd6e8080e87143fc9959f372e
Merge: 3c31c68 60fd657
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed May 24 09:18:58 2017 +0200

    Merge remote-tracking branch 'gdb/master' into indexcxx

commit 60fd657792228e3eb59e87c26fcdeccbfe94d224
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Wed May 24 00:00:45 2017 +0000

    Automatic date update in version.in

commit f7241d4f27cd59357a75bf802e9ffa7d95036deb
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Tue Apr 18 10:49:44 2017 -0700

    Use mips_regnum instead of constants for FreeBSD/mips register operations.
    
    gdb/ChangeLog:
    
    	* mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
    	(MIPS_FP0_REGNUM): Remove.
    	(MIPS_FSR_REGNUM): Remove.
    	(mips_fbsd_supply_fpregs): Use mips_regnum.
    	(mips_fbsd_supply_gregs): Likewise.
    	(mips_fbsd_collect_fpregs): Likewise.
    	(mips_fbsd_collect_gregs): Likewise.

commit d489d81d0934c4fda8c8aa68fbec1b1315cf8df0
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Tue Apr 18 10:49:44 2017 -0700

    Cleanups to FreeBSD/mips native register operations.
    
    Compare against the "raw" PC register number instead of the cooked
    register number when determining if a register was handled by
    PT_GETREGS.  Previously the register fetch/store operations only tried
    PT_GETREGS to fetch any individual register.  The result was that
    fetching or storing an individual register not covered by PT_GETREGS
    (such as floating point registers) did not work.
    
    While here, remove an early exit to simplify the code flow from the
    PT_GETREGS / PT_SETREGS case, and add a getfpregs_supplies similar to
    getregs_supplies to describe the registers supplied by PT_GETFPREGS
    and PT_SETFPREGS.
    
    gdb/ChangeLog:
    
    	* mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
    	(getpfpregs_supplies): New function.
    	(mips_fbsd_fetch_inferior_registers): Remove early exit and use
    	getfpregs_supplies.
    	(mips_fbsd_store_inferior_registers): Likewise.

commit 6e92fed5946111a76064feb8a2a184d224deae1a
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 23 06:49:35 2017 -0700

    x86: Update notrackbad tests for non-ELF targets
    
    	* gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF
    	targets.
    	* gas/testsuite/gas/i386/x86-64-notrackbad.l: Likewise.

commit 590b87ffa386ea403e2cb61525c6aafef77097a2
Author: Alan Modra <amodra@gmail.com>
Date:   Mon May 22 21:31:34 2017 +0930

    PR21503, Gold doesn't create linker stub symbols on ppc64
    
    	PR 21503
    	* options.h: Add --emit-stub-syms option.
    	* powerpc.cc (object_id): New.
    	(Powerpc_relobj): Add uniq_ and accessor.  Sort variables for
    	better packing.
    	(Powerpc_dynobj): Sort variables for better packing.
    	(Target_powerpc::define_local): New function.
    	(Target_powerpc::group_sections): Pass stub table size to
    	Stub_table constructor.
    	(Target_powerpc::do_relax): Define stub and glink symbols.
    	(Stub_table): Add uniq_ variable, and id param to constructor.
    	(Stub_table::Plt_stub_ent): Add indx_ variable.
    	(Stub_table::Branch_stub_entries): Move typedef earlier.
    	(Stub_table::branch_stub_size): Replace "to" parameter with a
    	Branch_stub_entries iterator.
    	(Stub_table::add_long_branch_entry): Adjust to suit.
    	(Stub_table::add_plt_call_entry): Set indx_.
    	(Stub_table::define_stub_syms): New function.

commit 6e3f3473e2136e77d6346d5bca894c38e5389116
Author: claziss <claziss@synopsys.com>
Date:   Tue May 23 12:18:11 2017 +0200

    [ARC] Reformat error messages.
    
    gas/
    2017-05-23  Claudiu Zissulescu <claziss@synopsys.com>
    
    	* config/tc-arc.c (md_apply_fix): Use as_bad_where.
    	(assemble_insn): Use as_bad.

commit 8e7f04f17c60069143078dafd3d3eb8cd15f10fb
Author: claziss <claziss@synopsys.com>
Date:   Tue May 23 12:18:10 2017 +0200

    [ARC] Fix fall through warnings.
    
    bfd/
    2017-05-23  Dilian Palauzov  <git-dpa@aegee.org>
    
    	* elf32-arc.c (arc_elf_merge_attributes): Add fall through
    	comments.

commit 575dcd27f8be6ecd3f89539a8210a8d3f0a271b1
Author: claziss <claziss@synopsys.com>
Date:   Tue May 23 12:18:10 2017 +0200

    [ARC] Update MAX_INSN_FLGS.
    
    It is required to parse instructions like ldb.x.a.di.
    
    include/
    2017-05-23  Claudiu Zissulescu <claziss@synopsys.com>
    
    	* opcode/arc.h (MAX_INSN_FLGS): Update to 4.

commit 903b2a564d78b8e47f2460a2a452f442e6e5e979
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Tue May 23 00:00:37 2017 +0000

    Automatic date update in version.in

commit 176efed15cabb932a7e9fb2c5e6ef0753e8351a0
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Mon May 15 10:11:57 2017 +0100

    gdb: Document vMustReplyEmpty remote packet
    
    Add mention of the vMustReplyEmpty to the remote serial protocol
    documentation.  It is important that this packet be treated in the same
    fashion as any other unknown 'v' packet, and I have tried to reflect
    this in the description of the packet, it is not simply the case that we
    _must_ return the empty string for this packet.
    
    As the intention is that we should treat this packet as unknown then an
    argument could be made that we should not document it, however, for
    someone implementing a gdbserver from scratch, seeing an undocumented
    packet arrive from gdb is confusing, and will probably cause them to
    have to read the code in order to check how this packet should be
    handled, which is not ideal.
    
    gdb/doc/ChangeLog:
    
    	* gdb.texinfo (Packets): Document vMustReplyEmpty packet.

commit 04ef582ace91cad765d056cc95624478e0421144
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 22 11:02:46 2017 -0700

    x86: Add NOTRACK prefix support
    
    For register indirect branches, NOTRACK prefix (0x3e), which is also
    the DS segment register prefix, can be used to ignore the CET indirect
    branch track.
    
    gas/
    
    	* config/tc-i386.c (REX_PREFIX): Changed to 7.
    	(NOTRACK_PREFIX): New.
    	(MAX_PREFIXES): Changed to 8.
    	(_i386_insn): Add notrack_prefix.
    	(PREFIX_GROUP): Add PREFIX_DS.
    	(add_prefix): Return PREFIX_DS for DS_PREFIX_OPCODE.
    	(md_assemble): Check if NOTRACK prefix is supported.
    	(parse_insn): Set notrack_prefix and issue an error for
    	other prefixes after NOTRACK prefix.
    	* testsuite/gas/i386/i386.exp: Run tests for NOTRACK prefix.
    	* testsuite/gas/i386/notrack-intel.d: New file.
    	* testsuite/gas/i386/notrack.d: Likewise.
    	* testsuite/gas/i386/notrack.s: Likewise.
    	* testsuite/gas/i386/notrackbad.l: Likewise.
    	* testsuite/gas/i386/notrackbad.s: Likewise.
    	* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
    	* testsuite/gas/i386/x86-64-notrack.d: Likewise.
    	* testsuite/gas/i386/x86-64-notrack.s: Likewise.
    	* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
    	* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
    
    include/
    
    	* include/opcode/i386.h (NOTRACK_PREFIX_OPCODE): New.
    
    opcodes/
    
    	* i386-dis.c (NOTRACK_Fixup): New.
    	(NOTRACK): Likewise.
    	(NOTRACK_PREFIX): Likewise.
    	(last_active_prefix): Likewise.
    	(reg_table): Use NOTRACK on indirect call and jmp.
    	(ckprefix): Set last_active_prefix.
    	(prefix_name): Return "notrack" for NOTRACK_PREFIX.
    	* i386-gen.c (opcode_modifiers): Add NoTrackPrefixOk.
    	* i386-opc.h (NoTrackPrefixOk): New.
    	(i386_opcode_modifier): Add notrackprefixok.
    	* i386-opc.tbl: Add NoTrackPrefixOk to indirect call and jmp.
    	Add notrack.
    	* i386-tbl.h: Regenerated.

commit 25f94347373b1b6f4bfc79eeb38e79d383195779
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 22 07:41:16 2017 -0700

    x86-64: Use dynobj instead of htab->elf.dynobj
    
    	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
    	dynobj instead of htab->elf.dynobj.

commit 9a6465c207ed4e34be92741316d78fc00f0836e4
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Mon May 22 09:50:29 2017 +0100

    [AArch64, ld] Support ILP32 triplet aarch64*-linux-gnu_ilp32
    
    This patch allows AArch64 LD defaulting to ILP32 if it is configured with
    aarch64*-linux-gnu_ilp32.
    
    ld/
    	* configure.tgt: Set "targ_emul" to "aarch64linux32b" for
    	aarch64_be-*-linux-gnu_ilp32.  Set "targ_emul" to "aarch64linux32" for
    	aarch64-*-linux-gnu_ilp32.

commit 3c0367d0e2df21717b7345a1ccadef39183457ab
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Mon May 22 09:50:19 2017 +0100

    [AArch64, gas] Support ILP32 triplet aarch64*-linux-gnu_ilp32
    
    This patch allows AArch64 GAS defaulting to ILP32 if it is configured with
    aarch64*-linux-gnu_ilp32.
    
    "md_after_parse_args" is implemented to update ABI into ILP32 if DEFAULT_ARCH is
    "aarch64:32".
    
    gas/
    	* configure.tgt: Set "arch" to "aarch64" if ${cpu} equals "aarch64".
    	Recognize the new triplet name aarch64*-linux-gnu_ilp32.
    	* configure.ac: Output DEFAULT_ARCH macro for AArch64.
    	* configure: Regenerate.
    	* config/tc-aarch64.h (aarch64_after_parse_args): New declaration.
    	(md_after_parse_args): New define.
    	* config/tc-aarch64.c (aarch64_abi_type): New enumeration
    	AARCH64_ABI_NONE.
    	(DEFAULT_ARCH): New define.
    	(aarch64_abi): Set default value to AARCH64_ABI_NONE.
    	(aarch64_after_parse_args): New function.

commit e11b3cdc565c5e86e43ef79d25fc5e8b88162ec1
Author: Pedro Alves <palves@redhat.com>
Date:   Mon May 22 11:58:19 2017 +0100

    gdb: Add John Baldwin as FreeBSD Maintainer
    
    gdb/ChangeLog:
    2017-05-22  Pedro Alves <palves@redhat.com>
    
    	* MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
    	maintainer.

commit 0f068fb5e5b65038c3ded3cfd2a4b8805196956c
Author: Alan Hayward <alan.hayward@arm.com>
Date:   Mon May 22 09:23:22 2017 +0100

    Add PPC_MAX_REGISTER_SIZE
    
    gdb/
    	* ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
    	(store_register): Likewise.
    	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
    	(get_decimal_float_return_value): Likewise.
    	(do_ppc_sysv_return_value): Likewise.
    	(ppc64_sysv_abi_push_integer): Likewise.
    	(ppc64_sysv_abi_push_freg): Likewise.
    	(ppc64_sysv_abi_return_value_base): Likewise.
    	(ppc64_sysv_abi_return_value): Likewise.
    	* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
    	* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
    	* rs6000-nat.c: Likewise.
    	* rs6000-tdep.c (rs6000_register_to_value): Likewise.
    	(rs6000_value_to_register): Likewise.
    	* ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.

commit ca49a96781f723d43ec49471cbbb50aa511d063e
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Mon May 22 00:00:35 2017 +0000

    Automatic date update in version.in

commit e6cf65f283b8be44014fad0ad0aebfbcc71fceac
Author: Tom Tromey <tom@tromey.com>
Date:   Sun May 21 17:00:10 2017 -0600

    Print Rust unsized array types a bit more nicely
    
    It's a bit difficult to create an unsized array type in Rust, but if
    you do, right now ptype will show something like "[u8; ]".  It really
    should print "[u8]", though, which is what this patch implements.
    
    This is part of PR 21466.
    
    Built and regtested on x86-64 Fedora 25.  I'm checking this in.
    
    ChangeLog
    2017-05-21  Tom Tromey  <tom@tromey.com>
    
    	PR rust/21466:
    	* rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
    	arrays as "[T]", not "[T; ]".
    
    testsuite/ChangeLog
    2017-05-21  Tom Tromey  <tom@tromey.com>
    
    	PR rust/21466:
    	* gdb.rust/unsized.exp: New file.
    	* gdb.rust/unsized.rs: New file.

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                 |   10 +
 bfd/elf32-arc.c                               |    4 +
 bfd/elf64-x86-64.c                            |    3 +-
 bfd/version.h                                 |    2 +-
 gas/ChangeLog                                 |   48 +
 gas/config/tc-aarch64.c                       |   30 +-
 gas/config/tc-aarch64.h                       |    3 +
 gas/config/tc-arc.c                           |   21 +-
 gas/config/tc-i386.c                          |   75 +-
 gas/configure                                 |    2 +-
 gas/configure.ac                              |    2 +-
 gas/configure.tgt                             |    9 +-
 gas/testsuite/gas/i386/i386.exp               |    6 +
 gas/testsuite/gas/i386/notrack-intel.d        |   29 +
 gas/testsuite/gas/i386/notrack.d              |   28 +
 gas/testsuite/gas/i386/notrack.s              |   35 +
 gas/testsuite/gas/i386/notrackbad.l           |   53 +
 gas/testsuite/gas/i386/notrackbad.s           |   22 +
 gas/testsuite/gas/i386/x86-64-notrack-intel.d |   30 +
 gas/testsuite/gas/i386/x86-64-notrack.d       |   29 +
 gas/testsuite/gas/i386/x86-64-notrack.s       |   40 +
 gas/testsuite/gas/i386/x86-64-notrackbad.l    |   53 +
 gas/testsuite/gas/i386/x86-64-notrackbad.s    |   22 +
 gdb/ChangeLog                                 |   47 +
 gdb/MAINTAINERS                               |    1 +
 gdb/doc/ChangeLog                             |    4 +
 gdb/doc/gdb.texinfo                           |   13 +
 gdb/mips-fbsd-nat.c                           |   24 +-
 gdb/mips-fbsd-tdep.c                          |   29 +-
 gdb/ppc-linux-nat.c                           |    4 +-
 gdb/ppc-sysv-tdep.c                           |   34 +-
 gdb/ppc-tdep.h                                |    3 +
 gdb/rs6000-aix-tdep.c                         |    6 +-
 gdb/rs6000-lynx178-tdep.c                     |    6 +-
 gdb/rs6000-nat.c                              |    4 +-
 gdb/rs6000-tdep.c                             |    4 +-
 gdb/rust-lang.c                               |    5 +-
 gdb/testsuite/ChangeLog                       |    6 +
 gdb/testsuite/gdb.rust/unsized.exp            |   35 +
 gdb/testsuite/gdb.rust/unsized.rs             |   33 +
 gold/ChangeLog                                |   21 +
 gold/options.h                                |    4 +
 gold/powerpc.cc                               |  192 +-
 include/ChangeLog                             |    8 +
 include/opcode/arc.h                          |    2 +-
 include/opcode/i386.h                         |    1 +
 ld/ChangeLog                                  |    6 +
 ld/configure.tgt                              |    8 +
 opcodes/ChangeLog                             |   16 +
 opcodes/i386-dis.c                            |   44 +-
 opcodes/i386-gen.c                            |    1 +
 opcodes/i386-opc.h                            |    3 +
 opcodes/i386-opc.tbl                          |   15 +-
 opcodes/i386-tbl.h                            |21299 +++++++++++++------------
 54 files changed, 11660 insertions(+), 10774 deletions(-)
 create mode 100644 gas/testsuite/gas/i386/notrack-intel.d
 create mode 100644 gas/testsuite/gas/i386/notrack.d
 create mode 100644 gas/testsuite/gas/i386/notrack.s
 create mode 100644 gas/testsuite/gas/i386/notrackbad.l
 create mode 100644 gas/testsuite/gas/i386/notrackbad.s
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack-intel.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack.d
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrack.s
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrackbad.l
 create mode 100644 gas/testsuite/gas/i386/x86-64-notrackbad.s
 create mode 100644 gdb/testsuite/gdb.rust/unsized.exp
 create mode 100644 gdb/testsuite/gdb.rust/unsized.rs

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 38462fe..4d15e1a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2017-05-23  Dilian Palauzov  <git-dpa@aegee.org>
+
+	* elf32-arc.c (arc_elf_merge_attributes): Add fall through
+	comments.
+
+2017-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
+	dynobj instead of htab->elf.dynobj.
+
 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 3e99cab..ef0d893 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -728,9 +728,11 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 
 	case Tag_ARC_ABI_pic:
 	  tagname = "PIC";
+	  /* fall through */
 	case Tag_ARC_ABI_sda:
 	  if (!tagname)
 	    tagname = "SDA";
+	  /* fall through */
 	case Tag_ARC_ABI_tls:
 	  {
 	    const char *tagval[] = { "Absent", "MWDT", "GNU" };
@@ -756,9 +758,11 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 
 	case Tag_ARC_ABI_double_size:
 	  tagname = "Double size";
+	  /* fall through */
 	case Tag_ARC_ABI_enumsize:
 	  if (!tagname)
 	    tagname = "Enum size";
+	  /* fall through */
 	case Tag_ARC_ABI_exceptions:
 	  if (!tagname)
 	    tagname = "ABI exceptions";
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 00cf70a..7beb78e 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -7245,8 +7245,7 @@ error_alignment:
 	  /* MPX PLT is supported only for non-NaCl target in 64-bit
 	     mode and is needed only for lazy binding.  */
 	  if (lazy_plt
-	      && info->bndplt
-	      && ABI_64_P (htab->elf.dynobj))
+	      && info->bndplt && ABI_64_P (dynobj))
 	    {
 	      /* Create the second PLT for Intel MPX support.  */
 	      sec = bfd_make_section_anyway_with_flags (dynobj,
diff --git a/bfd/version.h b/bfd/version.h
index 10ba349..e8c13d4 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20170521
+#define BFD_VERSION_DATE 20170524
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8fff0e4..2e7bb8d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,51 @@
+2017-05-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF
+	targets.
+	* gas/testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+
+2017-05-23  Claudiu Zissulescu <claziss@synopsys.com>
+
+	* config/tc-arc.c (md_apply_fix): Use as_bad_where.
+	(assemble_insn): Use as_bad.
+
+2017-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/tc-i386.c (REX_PREFIX): Changed to 7.
+	(NOTRACK_PREFIX): New.
+	(MAX_PREFIXES): Changed to 8.
+	(_i386_insn): Add notrack_prefix.
+	(PREFIX_GROUP): Add PREFIX_DS.
+	(add_prefix): Return PREFIX_DS for DS_PREFIX_OPCODE.
+	(md_assemble): Check if NOTRACK prefix is supported.
+	(parse_insn): Set notrack_prefix and issue an error for
+	other prefixes after NOTRACK prefix.
+	* testsuite/gas/i386/i386.exp: Run tests for NOTRACK prefix.
+	* testsuite/gas/i386/notrack-intel.d: New file.
+	* testsuite/gas/i386/notrack.d: Likewise.
+	* testsuite/gas/i386/notrack.s: Likewise.
+	* testsuite/gas/i386/notrackbad.l: Likewise.
+	* testsuite/gas/i386/notrackbad.s: Likewise.
+	* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
+	* testsuite/gas/i386/x86-64-notrack.d: Likewise.
+	* testsuite/gas/i386/x86-64-notrack.s: Likewise.
+	* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+	* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
+
+2017-05-22  Jiong Wang <jiong.wang@arm.com>
+
+	* configure.tgt: Set "arch" to "aarch64" if ${cpu} equals "aarch64".
+	Recognize the new triplet name aarch64*-linux-gnu_ilp32.
+	* configure.ac: Output DEFAULT_ARCH macro for AArch64.
+	* configure: Regenerate.
+	* config/tc-aarch64.h (aarch64_after_parse_args): New declaration.
+	(md_after_parse_args): New define.
+	* config/tc-aarch64.c (aarch64_abi_type): New enumeration
+	AARCH64_ABI_NONE.
+	(DEFAULT_ARCH): New define.
+	(aarch64_abi): Set default value to AARCH64_ABI_NONE.
+	(aarch64_after_parse_args): New function.
+
 2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
 	* config/tc-sparc.c (sparc_arch_table): Entries for `sparc6',
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 72b98fd..cdb2903 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -62,12 +62,20 @@ static symbolS *GOT_symbol;
 /* Which ABI to use.  */
 enum aarch64_abi_type
 {
-  AARCH64_ABI_LP64 = 0,
-  AARCH64_ABI_ILP32 = 1
+  AARCH64_ABI_NONE = 0,
+  AARCH64_ABI_LP64 = 1,
+  AARCH64_ABI_ILP32 = 2
 };
 
+#ifndef DEFAULT_ARCH
+#define DEFAULT_ARCH "aarch64"
+#endif
+
+/* DEFAULT_ARCH is initialized in gas/configure.tgt.  */
+static const char *default_arch = DEFAULT_ARCH;
+
 /* AArch64 ABI for the output file.  */
-static enum aarch64_abi_type aarch64_abi = AARCH64_ABI_LP64;
+static enum aarch64_abi_type aarch64_abi = AARCH64_ABI_NONE;
 
 /* When non-zero, program to a 32-bit model, in which the C data types
    int, long and all pointer types are 32-bit objects (ILP32); or to a
@@ -7975,6 +7983,22 @@ aarch64_force_relocation (struct fix *fixp)
 
 #ifdef OBJ_ELF
 
+/* Implement md_after_parse_args.  This is the earliest time we need to decide
+   ABI.  If no -mabi specified, the ABI will be decided by target triplet.  */
+
+void
+aarch64_after_parse_args (void)
+{
+  if (aarch64_abi != AARCH64_ABI_NONE)
+    return;
+
+  /* DEFAULT_ARCH will have ":32" extension if it's configured for ILP32.  */
+  if (strlen (default_arch) > 7 && strcmp (default_arch + 7, ":32") == 0)
+    aarch64_abi = AARCH64_ABI_ILP32;
+  else
+    aarch64_abi = AARCH64_ABI_LP64;
+}
+
 const char *
 elf64_aarch64_target_format (void)
 {
diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h
index 5bf1399..4aa3494 100644
--- a/gas/config/tc-aarch64.h
+++ b/gas/config/tc-aarch64.h
@@ -192,6 +192,9 @@ struct aarch64_segment_info_type
 #define tc_regname_to_dw2regnum            tc_aarch64_regname_to_dw2regnum
 #define tc_cfi_frame_initial_instructions  tc_aarch64_frame_initial_instructions
 
+extern void aarch64_after_parse_args (void);
+#define md_after_parse_args() aarch64_after_parse_args ()
+
 #else /* Not OBJ_ELF.  */
 #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
 #endif
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index a092892..173a1a0 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -2966,8 +2966,10 @@ md_apply_fix (fixS *fixP,
 	  break;
 	default:
 	  if ((int) fixP->fx_r_type < 0)
-	    as_fatal (_("PC relative relocation not allowed for (internal) type %d"),
-		      fixP->fx_r_type);
+	    as_bad_where (fixP->fx_file, fixP->fx_line,
+			  _("PC relative relocation not allowed for (internal)"
+			    " type %d"),
+			  fixP->fx_r_type);
 	  break;
 	}
     }
@@ -3942,9 +3944,8 @@ assemble_insn (const struct arc_opcode *opcode,
 	    {
 	    case O_plt:
 	      if (opcode->insn_class == JUMP)
-		as_bad_where (frag_now->fr_file, frag_now->fr_line,
-			      _("Unable to use @plt relocation for insn %s"),
-			      opcode->name);
+		as_bad (_("Unable to use @plt relocation for insn %s"),
+			opcode->name);
 	      needGOTSymbol = TRUE;
 	      reloc = find_reloc ("plt", opcode->name,
 				  pflags, nflg,
@@ -3962,9 +3963,8 @@ assemble_insn (const struct arc_opcode *opcode,
 		  reloc = ARC_RELOC_TABLE (t->X_md)->reloc;
 		  if (arc_opcode_len (opcode) == 2
 		      || opcode->insn_class == JUMP)
-		    as_bad_where (frag_now->fr_file, frag_now->fr_line,
-				  _("Unable to use @pcl relocation for insn %s"),
-				  opcode->name);
+		    as_bad (_("Unable to use @pcl relocation for insn %s"),
+			    opcode->name);
 		}
 	      else
 		{
@@ -4130,8 +4130,9 @@ assemble_insn (const struct arc_opcode *opcode,
   /* Check if the current instruction is legally used.  */
   if (arc_last_insns[1].has_delay_slot
       && is_br_jmp_insn_p (arc_last_insns[0].opcode))
-    as_bad_where (frag_now->fr_file, frag_now->fr_line,
-		  _("A jump/branch instruction in delay slot."));
+    as_bad (_("Insn %s has a jump/branch instruction %s in its delay slot."),
+	    arc_last_insns[1].opcode->name,
+	    arc_last_insns[0].opcode->name);
 }
 
 void
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 6250793..6c1091e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -66,8 +66,11 @@
 #define HLE_PREFIX	REP_PREFIX
 #define BND_PREFIX	REP_PREFIX
 #define LOCK_PREFIX	5
-#define REX_PREFIX	6       /* must come last.  */
-#define MAX_PREFIXES	7	/* max prefixes per opcode */
+/* Only one of NOTRACK_PREFIX and SEG_PREFIX can be used at the same
+   time.  */
+#define NOTRACK_PREFIX	6
+#define REX_PREFIX	7       /* must come last.  */
+#define MAX_PREFIXES	8	/* max prefixes per opcode */
 
 /* we define the syntax here (modulo base,index,scale syntax) */
 #define REGISTER_PREFIX '%'
@@ -388,6 +391,9 @@ struct _i386_insn
     /* Have BND prefix.  */
     const char *bnd_prefix;
 
+    /* Have NOTRACK prefix.  */
+    const char *notrack_prefix;
+
     /* Error message.  */
     enum i386_error error;
   };
@@ -2144,6 +2150,7 @@ enum PREFIX_GROUP
   PREFIX_EXIST = 0,
   PREFIX_LOCK,
   PREFIX_REP,
+  PREFIX_DS,
   PREFIX_OTHER
 };
 
@@ -2152,7 +2159,8 @@ enum PREFIX_GROUP
    same class already exists.
    b. PREFIX_LOCK if lock prefix is added.
    c. PREFIX_REP if rep/repne prefix is added.
-   d. PREFIX_OTHER if other prefix is added.
+   d. PREFIX_DS if ds prefix is added.
+   e. PREFIX_OTHER if other prefix is added.
  */
 
 static enum PREFIX_GROUP
@@ -2177,8 +2185,10 @@ add_prefix (unsigned int prefix)
 	default:
 	  abort ();
 
-	case CS_PREFIX_OPCODE:
 	case DS_PREFIX_OPCODE:
+	  ret = PREFIX_DS;
+	  /* Fall through.  */
+	case CS_PREFIX_OPCODE:
 	case ES_PREFIX_OPCODE:
 	case FS_PREFIX_OPCODE:
 	case GS_PREFIX_OPCODE:
@@ -3702,6 +3712,15 @@ md_assemble (char *line)
   if (i.bnd_prefix && !i.tm.opcode_modifier.bndprefixok)
     as_bad (_("expecting valid branch instruction after `bnd'"));
 
+  /* Check NOTRACK prefix.  */
+  if (i.notrack_prefix
+      && (!i.tm.opcode_modifier.notrackprefixok
+	  || i.reg_operands != 1
+	  || i.disp_operands != 0
+	  || i.mem_operands != 0
+	  || i.imm_operands != 0))
+    as_bad (_("expecting register indirect branch instruction after `notrack'"));
+
   if (i.tm.cpu_flags.bitfield.cpumpx)
     {
       if (flag_code == CODE_64BIT && i.prefix[ADDR_PREFIX])
@@ -3964,20 +3983,42 @@ parse_insn (char *line, char *mnemonic)
 	  else
 	    {
 	      /* Add prefix, checking for repeated prefixes.  */
-	      switch (add_prefix (current_templates->start->base_opcode))
+	      enum PREFIX_GROUP p
+		= add_prefix (current_templates->start->base_opcode);
+	      if (p == PREFIX_DS
+		  && current_templates->start->cpu_flags.bitfield.cpucet)
 		{
-		case PREFIX_EXIST:
-		  return NULL;
-		case PREFIX_REP:
-		  if (current_templates->start->cpu_flags.bitfield.cpuhle)
-		    i.hle_prefix = current_templates->start->name;
-		  else if (current_templates->start->cpu_flags.bitfield.cpumpx)
-		    i.bnd_prefix = current_templates->start->name;
-		  else
-		    i.rep_prefix = current_templates->start->name;
-		  break;
-		default:
-		  break;
+		  i.notrack_prefix = current_templates->start->name;
+		  /* Move NOTRACK_PREFIX_OPCODE to NOTRACK_PREFIX slot so
+		     that it is placed before others.  */
+		  i.prefix[SEG_PREFIX] = 0;
+		  i.prefix[NOTRACK_PREFIX] = NOTRACK_PREFIX_OPCODE;
+		}
+	      else
+		{
+		  switch (p)
+		    {
+		    case PREFIX_EXIST:
+		      return NULL;
+		    case PREFIX_REP:
+		      if (current_templates->start->cpu_flags.bitfield.cpuhle)
+			i.hle_prefix = current_templates->start->name;
+		      else if (current_templates->start->cpu_flags.bitfield.cpumpx)
+			i.bnd_prefix = current_templates->start->name;
+		      else
+			i.rep_prefix = current_templates->start->name;
+		      break;
+		    default:
+		      break;
+		    }
+
+		  if (i.notrack_prefix != NULL)
+		    {
+		      /* There must be no other prefixes after NOTRACK
+			 prefix.  */
+		      as_bad (_("expecting no other prefixes after `notrack'"));
+		      return NULL;
+		    }
 		}
 	    }
 	  /* Skip past PREFIX_SEPARATOR and reset token_start.  */
diff --git a/gas/configure b/gas/configure
index d3ae96e..96fa7cb 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12583,7 +12583,7 @@ $as_echo "#define NDS32_DEFAULT_AUDIO_EXT 1" >>confdefs.h
 $as_echo "$enable_audio_ext" >&6; }
 	;;
 
-      i386 | riscv | s390 | sparc)
+      aarch64 | i386 | riscv | s390 | sparc)
 	if test $this_target = $target ; then
 
 cat >>confdefs.h <<_ACEOF
diff --git a/gas/configure.ac b/gas/configure.ac
index cc70aa7..da161b7 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -511,7 +511,7 @@ changequote([,])dnl
 	AC_MSG_RESULT($enable_audio_ext)
 	;;
 
-      i386 | riscv | s390 | sparc)
+      aarch64 | i386 | riscv | s390 | sparc)
 	if test $this_target = $target ; then
 	  AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
 	fi
diff --git a/gas/configure.tgt b/gas/configure.tgt
index ca58b69..9d5e781 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -46,8 +46,8 @@ eval `echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
 # endian and arch.
 # Note: This table is alpha-sorted, please try to keep it that way.
 case ${cpu} in
-  aarch64)		cpu_type=aarch64 endian=little ;;
-  aarch64_be)		cpu_type=aarch64 endian=big ;;
+  aarch64)		cpu_type=aarch64 endian=little arch=aarch64;;
+  aarch64_be)		cpu_type=aarch64 endian=big arch=aarch64;;
   alpha*)		cpu_type=alpha ;;
   am33_2.0)		cpu_type=mn10300 endian=little ;;
   arc*eb)		cpu_type=arc endian=big ;;
@@ -126,7 +126,10 @@ generic_target=${cpu_type}-$vendor-$os
 case ${generic_target} in
   aarch64*-*-elf*)			fmt=elf;;
   aarch64*-*-fuchsia*)			fmt=elf;;
-  aarch64*-*-linux*)			fmt=elf em=linux ;;
+  aarch64*-*-linux*)			fmt=elf em=linux
+    case ${cpu}-${os} in
+      aarch64*-linux-gnu_ilp32)		arch=aarch64:32 ;;
+    esac ;;
 
   alpha-*-*vms*)			fmt=evax ;;
   alpha-*-osf*)				fmt=ecoff ;;
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index c1d6af7..67a7a13 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -385,6 +385,9 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     run_dump_test "cet"
     run_dump_test "cet-intel"
     run_dump_test "pseudos"
+    run_dump_test "notrack"
+    run_dump_test "notrack-intel"
+    run_list_test "notrackbad" "-al"
 
     # These tests require support for 8 and 16 bit relocs,
     # so we only run them for ELF and COFF targets.
@@ -805,6 +808,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
     run_dump_test "x86-64-cet"
     run_dump_test "x86-64-cet-intel"
     run_dump_test "x86-64-pseudos"
+    run_dump_test "x86-64-notrack"
+    run_dump_test "x86-64-notrack-intel"
+    run_list_test "x86-64-notrackbad" "-al"
 
     if { ![istarget "*-*-aix*"]
       && ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/notrack-intel.d b/gas/testsuite/gas/i386/notrack-intel.d
new file mode 100644
index 0000000..b99e194
--- /dev/null
+++ b/gas/testsuite/gas/i386/notrack-intel.d
@@ -0,0 +1,29 @@
+#source: notrack.s
+#objdump: -dw -Mintel
+#name: i386 NOTRACK prefix (Intel disassembly)
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ 	]*[a-f0-9]+:	3e ff d0             	notrack call eax
+[ 	]*[a-f0-9]+:	66 3e ff d0          	notrack call ax
+[ 	]*[a-f0-9]+:	3e ff e0             	notrack jmp eax
+[ 	]*[a-f0-9]+:	66 3e ff e0          	notrack jmp ax
+[ 	]*[a-f0-9]+:	f2 3e ff d0          	bnd notrack call eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff d0       	bnd notrack call ax
+[ 	]*[a-f0-9]+:	f2 3e ff e0          	bnd notrack jmp eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff e0       	bnd notrack jmp ax
+[ 	]*[a-f0-9]+:	3e ff d0             	notrack call eax
+[ 	]*[a-f0-9]+:	66 3e ff d0          	notrack call ax
+[ 	]*[a-f0-9]+:	3e ff e0             	notrack jmp eax
+[ 	]*[a-f0-9]+:	66 3e ff e0          	notrack jmp ax
+[ 	]*[a-f0-9]+:	f2 3e ff d0          	bnd notrack call eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff d0       	bnd notrack call ax
+[ 	]*[a-f0-9]+:	f2 3e ff e0          	bnd notrack jmp eax
+[ 	]*[a-f0-9]+:	66 f2 3e ff e0       	bnd notrack jmp ax
+[ 	]*[a-f0-9]+:	3e f2 ff d0          	ds bnd call eax
+[ 	]*[a-f0-9]+:	3e 66 ff d0          	ds call ax
+#pass
diff --git a/gas/testsuite/gas/i386/notrack.d b/gas/testsuite/gas/i386/notrack.d
new file mode 100644
index 0000000..eda09eb
--- /dev/null
+++ b/gas/testsuite/gas/i386/notrack.d
@@ -0,0 +1,28 @@
+#objdump: -dw
+#name: i386 NOTRACK prefix
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+


hooks/post-receive
--
Repository for Project Archer.


             reply	other threads:[~2017-05-24  7:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  7:20 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-24 20:35 jkratoch
2017-05-21 17:30 jkratoch
2017-05-07 20:21 jkratoch
2017-04-29 22:28 jkratoch
2017-04-22 14:46 jkratoch
2017-04-05 16:17 jkratoch
2017-03-22 21:57 jkratoch
2016-12-17 15:05 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170524072026.76626.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).