public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
* [TCWG CI] Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions
@ 2022-12-13 23:54 ci_notify
  2022-12-14  8:57 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: ci_notify @ 2022-12-13 23:54 UTC (permalink / raw)
  To: Jan Beulich; +Cc: gcc-regression

[-- Attachment #1: Type: text/plain, Size: 58694 bytes --]

Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions:

Results changed to
-10
# true:
0
# build_abe binutils:
1
# build_abe bootstrap_O3:
# FAILED
# First few build errors in logs:
# 00:08:36 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
# 00:44:06 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
# 01:01:09 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
# 01:02:40 make[2]: *** [Makefile:25808: compare] Error 1
# 01:02:40 make[1]: *** [Makefile:25788: stage3-bubble] Error 2
# 01:02:40 make: *** [Makefile:1063: all] Error 2

from
-10
# true:
0
# build_abe binutils:
1
# build_abe bootstrap_O3:
2

THIS IS THE END OF INTERESTING STUFF.  BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.

For latest status see comments in https://linaro.atlassian.net/browse/GNU-692 .
Status of gdb-12-branchpoint-3046-g969b9a36506 commit for tcwg_gcc_bootstrap:
commit 969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Dec 13 09:11:53 2022 +0100

    gas: re-work line number tracking for macros and their expansions
    
    The PR gas/16908 workaround aimed at uniformly reporting line numbers
    to reference macro invocation sites. As mentioned in a comment this may
    be desirable for small macros, but often isn't for larger ones. As a
    first step improve diagnostics to report both locations, while aiming at
    leaving generated debug info unaltered.
    
    Note that macro invocation context is lost for any diagnostics issued
    only after all input was processed (or more generally for any use of
    as_*_where(), as the functions can't know whether the passed in location
    is related to [part of] the present stack of locations). To maintain the
    intended workaround behavior for PR gas/16908, a new as_where() is
    introduced to "look through" macro invocations, while the existing
    as_where() is renamed (and used in only very few places for now). Down
    the road as_where() will likely want to return a list of (file,line)
    pairs.
* master-arm-bootstrap_O3
** Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions:
** https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/

Bad  build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/artifact/artifacts
Good build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/560/artifact/artifacts

Reproduce current build:
<cut>
mkdir -p investigate-binutils-969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
cd investigate-binutils-969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e

# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts

# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/artifact/artifacts/manifest.sh --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/560/artifact/artifacts/manifest.sh --fail

# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>

Full commit (up to 1000 lines):
<cut>
commit 969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Dec 13 09:11:53 2022 +0100

    gas: re-work line number tracking for macros and their expansions
    
    The PR gas/16908 workaround aimed at uniformly reporting line numbers
    to reference macro invocation sites. As mentioned in a comment this may
    be desirable for small macros, but often isn't for larger ones. As a
    first step improve diagnostics to report both locations, while aiming at
    leaving generated debug info unaltered.
    
    Note that macro invocation context is lost for any diagnostics issued
    only after all input was processed (or more generally for any use of
    as_*_where(), as the functions can't know whether the passed in location
    is related to [part of] the present stack of locations). To maintain the
    intended workaround behavior for PR gas/16908, a new as_where() is
    introduced to "look through" macro invocations, while the existing
    as_where() is renamed (and used in only very few places for now). Down
    the road as_where() will likely want to return a list of (file,line)
    pairs.
---
 gas/as.h                                           |   11 +
 gas/input-scrub.c                                  |  102 +-
 gas/macro.c                                        |   43 +-
 gas/messages.c                                     |   49 +-
 gas/sb.h                                           |    2 -
 gas/testsuite/gas/aarch64/illegal-by-element.l     |  396 +++--
 gas/testsuite/gas/aarch64/illegal-ldapr.l          |   36 +-
 gas/testsuite/gas/aarch64/illegal-lse.l            | 1648 +++++++++++++++-----
 gas/testsuite/gas/aarch64/illegal-sysreg-3.l       |   20 +
 gas/testsuite/gas/aarch64/illegal-sysreg-8.l       |  184 +++
 gas/testsuite/gas/aarch64/illegal-sysreg-8b.l      |   29 +
 gas/testsuite/gas/aarch64/illegal.l                |  900 +++++++----
 gas/testsuite/gas/aarch64/sve-movprfx_23.l         |   20 +
 gas/testsuite/gas/aarch64/sve-movprfx_26.l         |   13 +
 gas/testsuite/gas/arm/armv8-2-fp16-scalar-bad.l    |  702 ++++++---
 gas/testsuite/gas/arm/armv8-2-fp16-simd-warning.l  |  444 ++++--
 gas/testsuite/gas/arm/armv8-a+rdma.l               |   64 +
 gas/testsuite/gas/arm/bfloat16-bad.l               |   43 +
 gas/testsuite/gas/arm/bfloat16-thumb-bad.l         |   43 +
 .../gas/arm/group-reloc-ldc-parsing-bad.l          |  435 ++++--
 gas/testsuite/gas/arm/mve-vabsneg-bad-1.l          |   36 +-
 gas/testsuite/gas/arm/mve-vabsneg-bad-2.l          |   36 +-
 gas/testsuite/gas/arm/mve-vaddsubabd-bad-1.l       |   90 +-
 gas/testsuite/gas/arm/mve-vaddsubabd-bad-2.l       |   90 +-
 gas/testsuite/gas/arm/mve-vhadd-vhsub-vrhadd-bad.l |   90 +-
 gas/testsuite/gas/arm/mve-vldr-bad-1.l             |   72 +-
 gas/testsuite/gas/arm/mve-vldr-bad-2.l             |   36 +-
 gas/testsuite/gas/arm/mve-vldr-bad-3.l             |   54 +-
 gas/testsuite/gas/arm/mve-vmul-bad-2.l             |   72 +-
 gas/testsuite/gas/arm/mve-vqaddsub-bad.l           |   72 +-
 gas/testsuite/gas/arm/mve-vqdmulh-bad.l            |   72 +-
 gas/testsuite/gas/arm/mve-vqdmull-bad.l            |   72 +-
 gas/testsuite/gas/arm/mve-vqshl-bad.l              |   54 +-
 gas/testsuite/gas/arm/mve-vshl-bad.l               |   54 +-
 gas/testsuite/gas/arm/mve-vstld-bad.l              |  216 ++-
 gas/testsuite/gas/arm/mve-vstr-bad-1.l             |   72 +-
 gas/testsuite/gas/arm/mve-vstr-bad-2.l             |   36 +-
 gas/testsuite/gas/arm/mve-vstr-bad-3.l             |   54 +-
 gas/testsuite/gas/arm/neon-cond-bad.l              |   66 +-
 gas/testsuite/gas/arm/shift-bad-pc.l               |  165 +-
 gas/testsuite/gas/arm/simd_by_scalar_low_regbank.l |  144 +-
 .../gas/arm/sp-pc-validations-bad-t-v8a.l          |  180 ++-
 gas/testsuite/gas/arm/sp-pc-validations-bad-t.l    |   60 +-
 gas/testsuite/gas/arm/t16-bad.l                    |  492 ++++--
 gas/testsuite/gas/arm/thumb32.l                    |   50 +-
 gas/testsuite/gas/elf/bad-bss.err                  |   62 +
 gas/testsuite/gas/elf/line.l                       |   24 +-
 gas/testsuite/gas/i386/ilp32/reloc64.l             |  159 +-
 gas/testsuite/gas/i386/noreg-intel64.l             |  136 ++
 gas/testsuite/gas/i386/noreg16.l                   |  115 ++
 gas/testsuite/gas/i386/noreg32-data16.e            |   30 +-
 gas/testsuite/gas/i386/noreg32.l                   |  125 ++
 gas/testsuite/gas/i386/noreg64-data16.e            |   30 +-
 gas/testsuite/gas/i386/noreg64.l                   |  134 ++
 gas/testsuite/gas/i386/reloc32.l                   |  201 ++-
 gas/testsuite/gas/i386/reloc64.l                   |  249 ++-
 gas/testsuite/gas/ppc/bcaterr.l                    |  210 ++-
 gas/testsuite/gas/ppc/bcyerr.l                     |  171 +-
 gas/testsuite/gas/riscv/csr-version-1p10.l         |  795 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p11.l         |  793 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p12.l         |  675 ++++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.l        |  821 ++++++++++
 62 files changed, 9757 insertions(+), 2592 deletions(-)

diff --git a/gas/as.h b/gas/as.h
index 61f259f77c2..65affeb3835 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -437,6 +437,10 @@ typedef struct _pseudo_type pseudo_typeS;
 #define PRINTF_WHERE_LIKE(FCN) \
   void FCN (const char *file, unsigned int line, const char *format, ...) \
     __attribute__ ((__format__ (__printf__, 3, 4)))
+#define PRINTF_INDENT_LIKE(FCN) \
+  void FCN (const char *file, unsigned int line, unsigned int indent, \
+	    const char *format, ...) \
+    __attribute__ ((__format__ (__printf__, 4, 5)))
 
 #else /* __GNUC__ < 2 || defined(VMS) */
 
@@ -444,6 +448,10 @@ typedef struct _pseudo_type pseudo_typeS;
 #define PRINTF_WHERE_LIKE(FCN)	void FCN (const char *file, \
 					  unsigned int line, \
 					  const char *format, ...)
+#define PRINTF_INDENT_LIKE(FCN)	void FCN (const char *file, \
+					  unsigned int line, \
+					  unsigned int indent, \
+					  const char *format, ...)
 
 #endif /* __GNUC__ < 2 || defined(VMS) */
 
@@ -453,6 +461,7 @@ PRINTF_LIKE (as_tsktsk);
 PRINTF_LIKE (as_warn);
 PRINTF_WHERE_LIKE (as_bad_where);
 PRINTF_WHERE_LIKE (as_warn_where);
+PRINTF_INDENT_LIKE (as_info_where);
 
 void   as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 void   signal_init (void);
@@ -487,7 +496,9 @@ void   cond_finish_check (int);
 void   cond_exit_macro (int);
 int    seen_at_least_1_file (void);
 void   app_pop (char *);
+void   as_report_context (void);
 const char * as_where (unsigned int *);
+const char * as_where_top (unsigned int *);
 const char * as_where_physical (unsigned int *);
 void   bump_line_counters (void);
 void   do_scrub_begin (int);
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 650e3e38bbd..6791ef27749 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -104,6 +104,9 @@ static const char *logical_input_file;
 static unsigned int physical_input_line;
 static unsigned int logical_input_line;
 
+/* Indicator whether the origin of an update was a .linefile directive. */
+static bool is_linefile;
+
 /* Struct used to save the state of the input handler during include files */
 struct input_save {
   char *              buffer_start;
@@ -115,6 +118,7 @@ struct input_save {
   const char *        logical_input_file;
   unsigned int        physical_input_line;
   unsigned int        logical_input_line;
+  bool                is_linefile;
   size_t              sb_index;
   sb                  from_sb;
   enum expansion      from_sb_expansion; /* Should we do a conditional check?  */
@@ -166,6 +170,7 @@ input_scrub_push (char *saved_position)
   saved->logical_input_file = logical_input_file;
   saved->physical_input_line = physical_input_line;
   saved->logical_input_line = logical_input_line;
+  saved->is_linefile = is_linefile;
   saved->sb_index = sb_index;
   saved->from_sb = from_sb;
   saved->from_sb_expansion = from_sb_expansion;
@@ -193,6 +198,7 @@ input_scrub_pop (struct input_save *saved)
   logical_input_file = saved->logical_input_file;
   physical_input_line = saved->physical_input_line;
   logical_input_line = saved->logical_input_line;
+  is_linefile = saved->is_linefile;
   sb_index = saved->sb_index;
   from_sb = saved->from_sb;
   from_sb_expansion = saved->from_sb_expansion;
@@ -267,8 +273,6 @@ input_scrub_include_sb (sb *from, char *position, enum expansion expansion)
     as_fatal (_("macros nested too deeply"));
   ++macro_nest;
 
-  gas_assert (expansion < expanding_nested);
-
 #ifdef md_macro_start
   if (expansion == expanding_macro)
     {
@@ -283,8 +287,6 @@ input_scrub_include_sb (sb *from, char *position, enum expansion expansion)
      expansion.  */
   newline = from->len >= 1 && from->ptr[0] != '\n';
   sb_build (&from_sb, from->len + newline + 2 * sizeof (".linefile") + 30);
-  if (expansion == expanding_repeat && from_sb_expansion >= expanding_macro)
-    expansion = expanding_nested;
   from_sb_expansion = expansion;
   if (newline)
     {
@@ -437,10 +439,7 @@ bump_line_counters (void)
   if (sb_index == (size_t) -1)
     ++physical_input_line;
 
-  /* PR gas/16908 workaround: Don't bump logical line numbers while
-     expanding macros, unless file (and maybe line; see as_where()) are
-     used inside the macro.  */
-  if (logical_input_line != -1u && from_sb_expansion < expanding_macro)
+  if (logical_input_line != -1u)
     ++logical_input_line;
 }
 \f
@@ -471,10 +470,6 @@ new_logical_line_flags (const char *fname, /* DON'T destroy it!  We point to it!
     case 1 << 3:
       if (line_number < 0 || fname != NULL)
 	abort ();
-      /* PR gas/16908 workaround: Ignore updates when nested inside a macro
-	 expansion.  */
-      if (from_sb_expansion == expanding_nested)
-	return;
       if (next_saved_file == NULL)
 	fname = physical_input_file;
       else if (next_saved_file->logical_input_file)
@@ -486,6 +481,8 @@ new_logical_line_flags (const char *fname, /* DON'T destroy it!  We point to it!
       abort ();
     }
 
+  is_linefile = flags != 1 && (flags != 0 || fname);
+
   if (line_number >= 0)
     logical_input_line = line_number;
   else if (line_number == -1 && fname && !*fname && (flags & (1 << 2)))
@@ -499,15 +496,6 @@ new_logical_line_flags (const char *fname, /* DON'T destroy it!  We point to it!
       && (logical_input_file == NULL
 	  || filename_cmp (logical_input_file, fname)))
     logical_input_file = fname;
-
-  /* When encountering file or line changes inside a macro, arrange for
-     bump_line_counters() to henceforth increment the logical line number
-     again, just like it does when expanding repeats.  See as_where() for
-     why changing file or line alone doesn't alter expansion mode.  */
-  if (from_sb_expansion == expanding_macro
-      && logical_input_file != NULL
-      && logical_input_line != -1u)
-    from_sb_expansion = expanding_repeat;
 }
 
 void
@@ -516,6 +504,33 @@ new_logical_line (const char *fname, int line_number)
   new_logical_line_flags (fname, line_number, 0);
 }
 
+void
+as_report_context (void)
+{
+  const struct input_save *saved = next_saved_file;
+  enum expansion expansion = from_sb_expansion;
+  int indent = 1;
+
+  if (!macro_nest)
+    return;
+
+  do
+    {
+      if (expansion != expanding_macro)
+	/* Nothing.  */;
+      else if (saved->logical_input_file != NULL
+	       && saved->logical_input_line != -1u)
+	as_info_where (saved->logical_input_file, saved->logical_input_line,
+		       indent, _("macro invoked from here"));
+      else
+	as_info_where (saved->physical_input_file, saved->physical_input_line,
+		       indent, _("macro invoked from here"));
+
+      expansion = saved->from_sb_expansion;
+      ++indent;
+    }
+  while ((saved = saved->next_saved_file) != NULL);
+}
 \f
 /* Return the current physical input file name and line number, if known  */
 
@@ -534,10 +549,52 @@ as_where_physical (unsigned int *linep)
   return NULL;
 }
 
-/* Return the current file name and line number.  */
+/* Return the file name and line number at the top most macro
+   invocation, unless .file / .line were used inside a macro.  */
 
 const char *
 as_where (unsigned int *linep)
+{
+  const char *file = as_where_top (linep);
+
+  if (macro_nest && is_linefile)
+    {
+      const struct input_save *saved = next_saved_file;
+      enum expansion expansion = from_sb_expansion;
+
+      do
+	{
+	  if (!saved->is_linefile)
+	    break;
+
+	  if (expansion != expanding_macro)
+	    /* Nothing.  */;
+	  else if (saved->logical_input_file != NULL
+		   && (linep == NULL || saved->logical_input_line != -1u))
+	    {
+	      if (linep != NULL)
+		*linep = saved->logical_input_line;
+	      file = saved->logical_input_file;
+	    }
+	  else if (saved->physical_input_file != NULL)
+	    {
+	      if (linep != NULL)
+		*linep = saved->physical_input_line;
+	      file = saved->physical_input_file;
+	    }
+
+	  expansion = saved->from_sb_expansion;
+	}
+      while ((saved = saved->next_saved_file) != NULL);
+    }
+
+  return file;
+}
+
+/* Return the current file name and line number.  */
+
+const char *
+as_where_top (unsigned int *linep)
 {
   if (logical_input_file != NULL
       && (linep == NULL || logical_input_line != -1u))
@@ -549,4 +606,3 @@ as_where (unsigned int *linep)
 
   return as_where_physical (linep);
 }
-
diff --git a/gas/macro.c b/gas/macro.c
index 3d5774ee5e1..c41b9c00421 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -131,23 +131,21 @@ buffer_and_nest (const char *from, const char *to, sb *ptr,
   else
     from_len = strlen (from);
 
-  /* Except for macros record the present source position, such that
-     diagnostics and debug info will be properly associated with the
-     respective original lines, rather than with the line of the ending
-     directive (TO).  */
-  if (from == NULL || strcasecmp (from, "MACRO") != 0)
-    {
-      unsigned int line;
-      char *linefile;
-
-      as_where (&line);
-      if (!flag_m68k_mri)
-	linefile = xasprintf ("\t.linefile %u .", line + 1);
-      else
-	linefile = xasprintf ("\tlinefile %u .", line + 1);
-      sb_add_string (ptr, linefile);
-      xfree (linefile);
-    }
+  /* Record the present source position, such that diagnostics and debug info
+     can be properly associated with the respective original lines, rather
+     than with the line of the ending directive (TO).  */
+  {
+    unsigned int line;
+    char *linefile;
+
+    as_where_top (&line);
+    if (!flag_m68k_mri)
+      linefile = xasprintf ("\t.linefile %u .", line + 1);
+    else
+      linefile = xasprintf ("\tlinefile %u .", line + 1);
+    sb_add_string (ptr, linefile);
+    xfree (linefile);
+  }
 
   while (more)
     {
@@ -249,14 +247,8 @@ buffer_and_nest (const char *from, const char *to, sb *ptr,
 	    }
 
 	  /* PR gas/16908
-	     Apply and discard .linefile directives that appear within
-	     the macro.  For long macros, one might want to report the
-	     line number information associated with the lines within
-	     the macro definition, but we would need more infrastructure
-	     to make that happen correctly (e.g. resetting the line
-	     number when expanding the macro), and since for short
-	     macros we clearly prefer reporting the point of expansion
-	     anyway, there's not an obviously better fix here.  */
+	     Apply .linefile directives that appear within the macro, alongside
+	     keeping them for later expansion of the macro.  */
 	  if (from != NULL && strcasecmp (from, "MACRO") == 0
 	      && len >= 8 && strncasecmp (ptr->ptr + i, "linefile", 8) == 0)
 	    {
@@ -267,7 +259,6 @@ buffer_and_nest (const char *from, const char *to, sb *ptr,
 	      s_linefile (0);
 	      restore_ilp ();
 	      ptr->ptr[ptr->len] = saved_eol_char;
-	      ptr->len = line_start;
 	    }
 	}
 
diff --git a/gas/messages.c b/gas/messages.c
index e43b2dbd388..2f8c6ba2b8d 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -18,6 +18,7 @@
    02110-1301, USA.  */
 
 #include "as.h"
+#include <limits.h>
 #include <signal.h>
 
 /* If the system doesn't provide strsignal, we get it defined in
@@ -119,7 +120,7 @@ as_show_where (void)
   const char *file;
   unsigned int line;
 
-  file = as_where (&line);
+  file = as_where_top (&line);
   identify (file);
   if (file)
     {
@@ -130,6 +131,25 @@ as_show_where (void)
     }
 }
 
+/* Send to stderr a string as information, with location data passed in.
+   Note that for now this is not intended for general use.  */
+
+void
+as_info_where (const char *file, unsigned int line, unsigned int indent,
+	       const char *format, ...)
+{
+  va_list args;
+  char buffer[2000];
+
+  gas_assert (file != NULL && line > 0 && indent <= INT_MAX);
+
+  va_start (args, format);
+  vsnprintf (buffer, sizeof (buffer), format, args);
+  va_end (args);
+  fprintf (stderr, "%s:%u: %*s%s%s\n",
+	   file, line, (int)indent, "", _("Info: "), buffer);
+}
+
 /* Send to stderr a string as a warning, and locate warning
    in input file(s).
    Please only use this for when we have some recovery action.
@@ -146,6 +166,7 @@ as_tsktsk (const char *format, ...)
   vfprintf (stderr, format, args);
   va_end (args);
   (void) putc ('\n', stderr);
+  as_report_context ();
 }
 
 /* The common portion of as_warn and as_warn_where.  */
@@ -153,10 +174,15 @@ as_tsktsk (const char *format, ...)
 static void
 as_warn_internal (const char *file, unsigned int line, char *buffer)
 {
+  bool context = false;
+
   ++warning_count;
 
   if (file == NULL)
-    file = as_where (&line);
+    {
+      file = as_where_top (&line);
+      context = true;
+    }
 
   identify (file);
   if (file)
@@ -168,6 +194,10 @@ as_warn_internal (const char *file, unsigned int line, char *buffer)
     }
   else
     fprintf (stderr, "%s%s\n", _("Warning: "), buffer);
+
+  if (context)
+    as_report_context ();
+
 #ifndef NO_LISTING
   listing_warning (buffer);
 #endif
@@ -194,7 +224,7 @@ as_warn (const char *format, ...)
     }
 }
 
-/* Like as_bad but the file name and line number are passed in.
+/* Like as_warn but the file name and line number are passed in.
    Unfortunately, we have to repeat the function in order to handle
    the varargs correctly and portably.  */
 
@@ -218,10 +248,15 @@ as_warn_where (const char *file, unsigned int line, const char *format, ...)
 static void
 as_bad_internal (const char *file, unsigned int line, char *buffer)
 {
+  bool context = false;
+
   ++error_count;
 
   if (file == NULL)
-    file = as_where (&line);
+    {
+      file = as_where_top (&line);
+      context = true;
+    }
 
   identify (file);
   if (file)
@@ -233,6 +268,10 @@ as_bad_internal (const char *file, unsigned int line, char *buffer)
     }
   else
     fprintf (stderr, "%s%s\n", _("Error: "), buffer);
+
+  if (context)
+    as_report_context ();
+
 #ifndef NO_LISTING
   listing_error (buffer);
 #endif
@@ -290,6 +329,7 @@ as_fatal (const char *format, ...)
   vfprintf (stderr, format, args);
   (void) putc ('\n', stderr);
   va_end (args);
+  as_report_context ();
   /* Delete the output file, if it exists.  This will prevent make from
      thinking that a file was created and hence does not need rebuilding.  */
   if (out_file_name != NULL)
@@ -312,6 +352,7 @@ as_abort (const char *file, int line, const char *fn)
     fprintf (stderr, _("Internal error in %s at %s:%d.\n"), fn, file, line);
   else
     fprintf (stderr, _("Internal error at %s:%d.\n"), file, line);
+  as_report_context ();
 
   fprintf (stderr, _("Please report this bug.\n"));
 
diff --git a/gas/sb.h b/gas/sb.h
index 4f23b3a23a7..6d67ea44c2d 100644
--- a/gas/sb.h
+++ b/gas/sb.h
@@ -66,11 +66,9 @@ extern size_t sb_skip_comma (size_t, sb *);
 
 /* Actually in input-scrub.c.  */
 enum expansion {
-  /* Note: Order matters!  */
   expanding_none,
   expanding_repeat,
   expanding_macro,
-  expanding_nested, /* Only for internal use of input-scrub.c.  */
 };
 extern void input_scrub_include_sb (sb *, char *, enum expansion);
 
diff --git a/gas/testsuite/gas/aarch64/illegal-by-element.l b/gas/testsuite/gas/aarch64/illegal-by-element.l
index 467ccf65552..520db792edb 100644
--- a/gas/testsuite/gas/aarch64/illegal-by-element.l
+++ b/gas/testsuite/gas/aarch64/illegal-by-element.l
@@ -1,133 +1,265 @@
 [^:]*: Assembler messages:
-[^:]*:18: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:18: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:18: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:19: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:19: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:19: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:20: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:20: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:20: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:21: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:21: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:21: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:22: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:22: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:22: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:23: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:23: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:23: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:24: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:24: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:24: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:25: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:25: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:25: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:26: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:26: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:26: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:27: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:27: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:27: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:28: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:28: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:28: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:29: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:29: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:29: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:30: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:30: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:30: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:31: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:31: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:31: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:32: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:32: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:32: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:33: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:33: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:33: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:34: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:34: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:34: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:35: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:35: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:35: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:36: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:36: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:36: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:37: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:37: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:37: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:38: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:38: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:38: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:39: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:39: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:39: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:40: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:40: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:40: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:41: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:41: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:41: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:42: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:42: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:42: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:43: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:43: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:43: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:44: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v16.h\[0\]'
-[^:]*:44: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v27.h\[0\]'
-[^:]*:44: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v31.h\[0\]'
-[^:]*:45: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:45: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:45: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:46: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:46: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:46: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:47: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:47: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:47: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:48: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:48: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:48: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:49: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v16.h\[0\]'
-[^:]*:49: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v27.h\[0\]'
-[^:]*:49: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v31.h\[0\]'
-[^:]*:50: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v16.h\[0\]'
-[^:]*:50: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v27.h\[0\]'
-[^:]*:50: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v31.h\[0\]'
-[^:]*:52: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v16.h\[0\]'
-[^:]*:52: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v27.h\[0\]'
-[^:]*:52: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v31.h\[0\]'
-[^:]*:53: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v16.h\[0\]'
-[^:]*:53: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v27.h\[0\]'
-[^:]*:53: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v31.h\[0\]'
-[^:]*:54: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v16.h\[0\]'
-[^:]*:54: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v27.h\[0\]'
-[^:]*:54: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v31.h\[0\]'
-[^:]*:55: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v16.h\[0\]'
-[^:]*:55: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v27.h\[0\]'
-[^:]*:55: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v31.h\[0\]'
-[^:]*:56: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v16.h\[0\]'
-[^:]*:56: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v27.h\[0\]'
-[^:]*:56: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v31.h\[0\]'
-[^:]*:57: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v16.h\[0\]'
-[^:]*:57: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v27.h\[0\]'
-[^:]*:57: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v31.h\[0\]'
-[^:]*:58: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v16.h\[0\]'
-[^:]*:58: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v27.h\[0\]'
-[^:]*:58: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v31.h\[0\]'
-[^:]*:59: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v16.h\[0\]'
-[^:]*:59: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v27.h\[0\]'
-[^:]*:59: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v31.h\[0\]'
-[^:]*:60: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v16.h\[0\]'
-[^:]*:60: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v27.h\[0\]'
-[^:]*:60: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v31.h\[0\]'
-[^:]*:61: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v16.h\[0\]'
-[^:]*:61: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v27.h\[0\]'
-[^:]*:61: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v31.h\[0\]'
-[^:]*:62: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v16.h\[0\]'
-[^:]*:62: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v27.h\[0\]'
-[^:]*:62: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v31.h\[0\]'
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:18: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:18: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmla v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:18: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:19: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:19: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:19: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:20: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:20: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlal2 v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:20: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:21: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:21: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmls v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:21: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:22: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:22: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:22: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:23: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:23: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmlsl2 v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:23: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:24: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:24: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmul v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:24: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:25: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:25: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `fmulx v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:25: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:26: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:26: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mla v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:26: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:27: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:27: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mls v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:27: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:28: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:28: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `mul v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:28: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:29: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:29: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:29: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:30: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:30: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlal2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:30: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:31: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:31: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:31: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:32: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:32: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smlsl2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:32: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:33: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:33: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:33: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:34: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:34: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `smull2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:34: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:35: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:35: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:35: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:36: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:36: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:36: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:37: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:37: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:37: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:38: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:38: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:38: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:39: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:39: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:39: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:40: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:40: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:40: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:41: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:41: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:41: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:42: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:42: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:42: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:43: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:43: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:43: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v16.h\[0\]'
+[^:]*:44: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v27.h\[0\]'
+[^:]*:44: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh v2.4h,v12.4h,v31.h\[0\]'
+[^:]*:44: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:45: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:45: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:45: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:46: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:46: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlal2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:46: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:47: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:47: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:47: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:48: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:48: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umlsl2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:48: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v16.h\[0\]'
+[^:]*:49: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v27.h\[0\]'
+[^:]*:49: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull v2.4s,v12.4h,v31.h\[0\]'
+[^:]*:49: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v16.h\[0\]'
+[^:]*:50: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v27.h\[0\]'
+[^:]*:50: *Info: macro .*
+[^:]*:4: Error: register number out of range 0 to 15 at operand 3 -- `umull2 v2.4s,v12.8h,v31.h\[0\]'
+[^:]*:50: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v16.h\[0\]'
+[^:]*:52: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v27.h\[0\]'
+[^:]*:52: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlal s2,h12,v31.h\[0\]'
+[^:]*:52: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v16.h\[0\]'
+[^:]*:53: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v27.h\[0\]'
+[^:]*:53: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmlsl s2,h12,v31.h\[0\]'
+[^:]*:53: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v16.h\[0\]'
+[^:]*:54: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v27.h\[0\]'
+[^:]*:54: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmull s2,h12,v31.h\[0\]'
+[^:]*:54: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v16.h\[0\]'
+[^:]*:55: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v27.h\[0\]'
+[^:]*:55: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqdmulh h2,h12,v31.h\[0\]'
+[^:]*:55: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v16.h\[0\]'
+[^:]*:56: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v27.h\[0\]'
+[^:]*:56: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmulh h2,h12,v31.h\[0\]'
+[^:]*:56: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v16.h\[0\]'
+[^:]*:57: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v27.h\[0\]'
+[^:]*:57: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmla h2,h12,v31.h\[0\]'
+[^:]*:57: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v16.h\[0\]'
+[^:]*:58: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v27.h\[0\]'
+[^:]*:58: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmls h2,h12,v31.h\[0\]'
+[^:]*:58: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v16.h\[0\]'
+[^:]*:59: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v27.h\[0\]'
+[^:]*:59: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmul h2,h12,v31.h\[0\]'
+[^:]*:59: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v16.h\[0\]'
+[^:]*:60: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v27.h\[0\]'
+[^:]*:60: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `fmulx h2,h12,v31.h\[0\]'
+[^:]*:60: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v16.h\[0\]'
+[^:]*:61: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v27.h\[0\]'
+[^:]*:61: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlah h2,h12,v31.h\[0\]'
+[^:]*:61: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v16.h\[0\]'
+[^:]*:62: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v27.h\[0\]'
+[^:]*:62: *Info: macro .*
+[^:]*:12: Error: register number out of range 0 to 15 at operand 3 -- `sqrdmlsh h2,h12,v31.h\[0\]'
+[^:]*:62: *Info: macro .*
diff --git a/gas/testsuite/gas/aarch64/illegal-ldapr.l b/gas/testsuite/gas/aarch64/illegal-ldapr.l
index 5179cf5a477..8a91e79e8ef 100644
--- a/gas/testsuite/gas/aarch64/illegal-ldapr.l
+++ b/gas/testsuite/gas/aarch64/illegal-ldapr.l
@@ -2,15 +2,27 @@
 [^:]+:18: Error: operand mismatch -- `ldaprb x0,\[x1\]'
 [^:]+:19: Error: operand mismatch -- `ldaprh x0,\[x1\]'
 [^:]+:20: Error: the optional immediate offset can only be 0 at operand 2 -- `ldapr x0,\[x1,#8\]'
-[^:]+:23: Error: 64-bit integer or SP register expected at operand 2 -- `ldaprb w1,\[xz\]'
-[^:]+:23: Error: the optional immediate offset can only be 0 at operand 2 -- `ldaprb w1,\[x7,#8\]'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldaprb w1,\[x7,#8\]!'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldaprb w1,\[x7\],#8'
-[^:]+:23: Error: 64-bit integer or SP register expected at operand 2 -- `ldaprh w1,\[xz\]'
-[^:]+:23: Error: the optional immediate offset can only be 0 at operand 2 -- `ldaprh w1,\[x7,#8\]'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldaprh w1,\[x7,#8\]!'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldaprh w1,\[x7\],#8'
-[^:]+:23: Error: 64-bit integer or SP register expected at operand 2 -- `ldapr w1,\[xz\]'
-[^:]+:23: Error: the optional immediate offset can only be 0 at operand 2 -- `ldapr w1,\[x7,#8\]'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldapr w1,\[x7,#8\]!'
-[^:]+:23: Error: invalid addressing mode at operand 2 -- `ldapr w1,\[x7\],#8'
+[^:]+:5: Error: 64-bit integer or SP register expected at operand 2 -- `ldaprb w1,\[xz\]'
+[^:]+:23:  Info: macro .*
+[^:]+:6: Error: the optional immediate offset can only be 0 at operand 2 -- `ldaprb w1,\[x7,#8\]'
+[^:]+:23:  Info: macro .*
+[^:]+:7: Error: invalid addressing mode at operand 2 -- `ldaprb w1,\[x7,#8\]!'
+[^:]+:23:  Info: macro .*
+[^:]+:8: Error: invalid addressing mode at operand 2 -- `ldaprb w1,\[x7\],#8'
+[^:]+:23:  Info: macro .*
+[^:]+:5: Error: 64-bit integer or SP register expected at operand 2 -- `ldaprh w1,\[xz\]'
+[^:]+:23:  Info: macro .*
+[^:]+:6: Error: the optional immediate offset can only be 0 at operand 2 -- `ldaprh w1,\[x7,#8\]'
+[^:]+:23:  Info: macro .*
+[^:]+:7: Error: invalid addressing mode at operand 2 -- `ldaprh w1,\[x7,#8\]!'
+[^:]+:23:  Info: macro .*
+[^:]+:8: Error: invalid addressing mode at operand 2 -- `ldaprh w1,\[x7\],#8'
+[^:]+:23:  Info: macro .*
+[^:]+:5: Error: 64-bit integer or SP register expected at operand 2 -- `ldapr w1,\[xz\]'
+[^:]+:23:  Info: macro .*
+[^:]+:6: Error: the optional immediate offset can only be 0 at operand 2 -- `ldapr w1,\[x7,#8\]'
+[^:]+:23:  Info: macro .*
+[^:]+:7: Error: invalid addressing mode at operand 2 -- `ldapr w1,\[x7,#8\]!'
+[^:]+:23:  Info: macro .*
+[^:]+:8: Error: invalid addressing mode at operand 2 -- `ldapr w1,\[x7\],#8'
+[^:]+:23:  Info: macro .*
diff --git a/gas/testsuite/gas/aarch64/illegal-lse.l b/gas/testsuite/gas/aarch64/illegal-lse.l
index dd57f99ed73..b47108df161 100644
--- a/gas/testsuite/gas/aarch64/illegal-lse.l
+++ b/gas/testsuite/gas/aarch64/illegal-lse.l
@@ -1,433 +1,1217 @@
 [^:]*: Assembler messages:
-[^:]*:68: Error: operand mismatch -- `cas w0,x1,\[x2\]'
</cut>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [TCWG CI] Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions
  2022-12-13 23:54 [TCWG CI] Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions ci_notify
@ 2022-12-14  8:57 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2022-12-14  8:57 UTC (permalink / raw)
  To: ci_notify; +Cc: gcc-regression

On 14.12.2022 00:54, ci_notify@linaro.org wrote:
> Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions:
> 
> Results changed to
> -10
> # true:
> 0
> # build_abe binutils:
> 1
> # build_abe bootstrap_O3:
> # FAILED
> # First few build errors in logs:
> # 00:08:36 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
> # 00:44:06 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
> # 01:01:09 make[3]: [Makefile:1818: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored)
> # 01:02:40 make[2]: *** [Makefile:25808: compare] Error 1
> # 01:02:40 make[1]: *** [Makefile:25788: stage3-bubble] Error 2
> # 01:02:40 make: *** [Makefile:1063: all] Error 2

All this allows me is to guess that there was a comparison failure of
some of the generated binaries between stage2 and stage3. Would be nice
if such a mail contained more helpful information. 

> * master-arm-bootstrap_O3
> ** Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions:
> ** https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/
> 
> Bad  build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/artifact/artifacts

Following this link allows me to prove the suspicion, but the artifacts
don't include any object files, so I can't look at their differences.
Re-creating the apparently problematic assembler input from gcc sources
and passing it through the assembler multiple times doesn't yield any
difference here. Hence I'm lost as to investigating this breakage, and I
have the at least vague feeling that my change may merely have uncovered
an issue which was latently there already before.

Suggestions very welcome,
Jan

> Good build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/560/artifact/artifacts
> 
> Reproduce current build:
> <cut>
> mkdir -p investigate-binutils-969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
> cd investigate-binutils-969b9a36506bfb386f8ce30f88f1a6a6ebbaca6e
> 
> # Fetch scripts
> git clone https://git.linaro.org/toolchain/jenkins-scripts
> 
> # Fetch manifests for bad and good builds
> mkdir -p bad/artifacts good/artifacts
> curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/561/artifact/artifacts/manifest.sh --fail
> curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-arm-bootstrap_O3/560/artifact/artifacts/manifest.sh --fail
> 
> # Reproduce bad build
> (cd bad; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
> # Reproduce good build
> (cd good; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
> </cut>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-14  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 23:54 [TCWG CI] Failure after gdb-12-branchpoint-3046-g969b9a36506: gas: re-work line number tracking for macros and their expansions ci_notify
2022-12-14  8:57 ` Jan Beulich

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).