x86/Intel: don't report multiple errors for a single insn operand
authorJan Beulich <jbeulich@novell.com>
Thu, 23 Nov 2017 09:57:54 +0000 (10:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Nov 2017 09:57:54 +0000 (10:57 +0100)
Multiple errors are more confusing than helpful, as the more generic
one often implies a sufficiently different adjustment than would
actually be needed to fix the code. Additionally it makes it more
cumbersome to add missing error checks, as the testsuite then needs
extra updating.

gas/ChangeLog
gas/config/tc-i386-intel.c
gas/testsuite/gas/i386/inval-avx512f.l
gas/testsuite/gas/i386/x86-64-inval-avx512f.l

index d77e7ef6f6a736599a9ca5694a6278e3a8e2eee9..8b6f8f9224fab9a277df4b379f4ae637e6f5a6b9 100644 (file)
@@ -1,3 +1,10 @@
+2017-11-23  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386-intel.c (i386_intel_operand): Don't call
+       as_bad() if a prior error was already reported.
+       * testsuite/gas/i386/inval-avx512f.l,
+       testsuite/gas/i386/x86-64-inval-avx512f.l: Adjust expectations.
+
 2017-11-22  Jim Wilson  <jimw@sifive.com>
 
        * as.c: Include write.h.
index b8874e4b8dd79db0705f2c6ba6344104eb72264b..79fe0b47d4589f770fd986d5bc1909933c6d0dda 100644 (file)
@@ -580,12 +580,14 @@ i386_intel_operand (char *operand_string, int got_a_float)
 
   if (!is_end_of_line[(unsigned char) *input_line_pointer])
     {
-      as_bad (_("junk `%s' after expression"), input_line_pointer);
+      if (ret)
+       as_bad (_("junk `%s' after expression"), input_line_pointer);
       ret = 0;
     }
   else if (exp.X_op == O_illegal || exp.X_op == O_absent)
     {
-      as_bad (_("invalid expression"));
+      if (ret)
+       as_bad (_("invalid expression"));
       ret = 0;
     }
   else if (!intel_state.has_offset
index b49a1d598af4b8da61f178dc6dbf43f5d1c90e35..357a3c66289347865919d0ab89fcf3602e11a398 100644 (file)
 .*:26: Error: .*
 .*:27: Error: .*
 .*:28: Error: .*
-.*:28: Error: .*
-.*:29: Error: .*
 .*:29: Error: .*
 .*:30: Error: .*
-.*:30: Error: .*
 .*:32: Error: .*
 .*:33: Error: .*
 .*:35: Error: .*
index 21c4906815169542d5564f50a0b29453a6b25a9c..1f7251d773200cae964a28fc7281b4863e5b9b1c 100644 (file)
 .*:25: Error: .*
 .*:26: Error: .*
 .*:27: Error: .*
-.*:27: Error: .*
-.*:28: Error: .*
 .*:28: Error: .*
 .*:29: Error: .*
-.*:29: Error: .*
 .*:31: Error: .*
 .*:32: Error: .*
 .*:34: Error: .*
This page took 0.029907 seconds and 4 git commands to generate.