aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2017-11-23 10:57:54 +0100
committerJan Beulich <jbeulich@suse.com>2017-11-23 10:57:54 +0100
commit38bf51134d1a58f155c89f2b1c7bf885c2604ead (patch)
tree19c6b1b704b0a68c64fa23b28bc5cf922b797231
parent9c23b42ffa67b866cd7562c1d8caed70db5d6840 (diff)
downloadgdb-38bf51134d1a58f155c89f2b1c7bf885c2604ead.zip
gdb-38bf51134d1a58f155c89f2b1c7bf885c2604ead.tar.gz
gdb-38bf51134d1a58f155c89f2b1c7bf885c2604ead.tar.bz2
x86/Intel: don't report multiple errors for a single insn operand
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.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386-intel.c6
-rw-r--r--gas/testsuite/gas/i386/inval-avx512f.l3
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-avx512f.l3
4 files changed, 11 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d77e7ef..8b6f8f9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index b8874e4..79fe0b4 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -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
diff --git a/gas/testsuite/gas/i386/inval-avx512f.l b/gas/testsuite/gas/i386/inval-avx512f.l
index b49a1d5..357a3c6 100644
--- a/gas/testsuite/gas/i386/inval-avx512f.l
+++ b/gas/testsuite/gas/i386/inval-avx512f.l
@@ -18,11 +18,8 @@
.*:26: Error: .*
.*:27: Error: .*
.*:28: Error: .*
-.*:28: Error: .*
-.*:29: Error: .*
.*:29: Error: .*
.*:30: Error: .*
-.*:30: Error: .*
.*:32: Error: .*
.*:33: Error: .*
.*:35: Error: .*
diff --git a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
index 21c4906..1f7251d 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
+++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
@@ -17,11 +17,8 @@
.*:25: Error: .*
.*:26: Error: .*
.*:27: Error: .*
-.*:27: Error: .*
-.*:28: Error: .*
.*:28: Error: .*
.*:29: Error: .*
-.*:29: Error: .*
.*:31: Error: .*
.*:32: Error: .*
.*:34: Error: .*