Move the first i.error out of the loop.
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 4 Aug 2010 20:52:20 +0000 (20:52 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 4 Aug 2010 20:52:20 +0000 (20:52 +0000)
2010-08-04  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (match_template): Move the first i.error
out of the loop.

gas/ChangeLog
gas/config/tc-i386.c

index 648e61b3df97eeebc734454c27a0520ae6c269bb..54a88f6260f0b78d07986a057fa6cf0a1c02d086 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (match_template): Move the first i.error
+       out of the loop.
+
 2010-08-04  Alan Modra  <amodra@gmail.com>
 
        * configure.tgt (m32c): Set endian=little.
index 281faaaf193bb6e5a35b2b5a4a1b852a821ea89c..03ea5625d2c877579be3d8069f1f0dd443575098 100644 (file)
@@ -3848,12 +3848,13 @@ match_template (void)
   else if (i.suffix == LONG_DOUBLE_MNEM_SUFFIX)
     suffix_check.no_ldsuf = 1;
 
+  /* Must have right number of operands.  */
+  i.error = number_of_operands_mismatch;
+
   for (t = current_templates->start; t < current_templates->end; t++)
     {
       addr_prefix_disp = -1;
 
-      /* Must have right number of operands.  */
-      i.error = number_of_operands_mismatch;
       if (i.operands != t->operands)
        continue;