aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2012-07-31 07:41:39 +0000
committerJan Beulich <jbeulich@novell.com>2012-07-31 07:41:39 +0000
commit5614d22c1d90a99acb57d6bcf74fdc32e2723bc5 (patch)
tree36f77b1ba4ee511cfb678ef9db62534a9cad64ea /gas
parent94948e646e55a91768ca9e5da4d96a1633a7e1c4 (diff)
downloadgdb-5614d22c1d90a99acb57d6bcf74fdc32e2723bc5.zip
gdb-5614d22c1d90a99acb57d6bcf74fdc32e2723bc5.tar.gz
gdb-5614d22c1d90a99acb57d6bcf74fdc32e2723bc5.tar.bz2
At the point where check_VecOperands()/VEX_check_operands() get run,
all other instruction attributes already matched, so any mismatch here will tell the user more precisely what is wrong than using an eventual (and very likely to occur) more generic error encountered on a subsequent iteration through the template matching loop. 2012-07-31 Jan Beulich <jbeulich@suse.com> * config/tc-i386.c (match_template): New local variable 'specific_error'. Set it from i.error after failed check_VecOperands or VEX_check_operands. Use it if set in preference to i.error when actually issuing disagnostic.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386.c16
2 files changed, 15 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a1a4998..600871d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2012-07-31 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (match_template): New local variable
+ 'specific_error'. Set it from i.error after failed
+ check_VecOperands or VEX_check_operands. Use it if set in
+ preference to i.error when actually issuing disagnostic.
+
2012-07-30 Nick Clifton <nickc@redhat.com>
* po/gas.pot: Updated template.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9bd2f64..b8c08e8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4015,6 +4015,7 @@ match_template (void)
unsigned int j;
unsigned int found_cpu_match;
unsigned int check_register;
+ enum i386_error specific_error = 0;
#if MAX_OPERANDS != 5
# error "MAX_OPERANDS must be 5."
@@ -4311,13 +4312,12 @@ check_reverse:
continue;
}
- /* Check if vector operands are valid. */
- if (check_VecOperands (t))
- continue;
-
- /* Check if VEX operands are valid. */
- if (VEX_check_operands (t))
- continue;
+ /* Check if vector and VEX operands are valid. */
+ if (check_VecOperands (t) || VEX_check_operands (t))
+ {
+ specific_error = i.error;
+ continue;
+ }
/* We've found a match; break out of loop. */
break;
@@ -4327,7 +4327,7 @@ check_reverse:
{
/* We found no match. */
const char *err_msg;
- switch (i.error)
+ switch (specific_error ? specific_error : i.error)
{
default:
abort ();