2006-12-14 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 14 Dec 2006 13:28:24 +0000 (13:28 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 14 Dec 2006 13:28:24 +0000 (13:28 +0000)
* config/tc-i386.c (match_template): Simplify 3 and 4 operand
match.

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

index ec7aa617766e00386589212bd5e5e4d21fd4e107..7bcb1ce60d313bb53f1ed0951e1a07d26c82db0e 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (match_template): Simplify 3 and 4 operand
+       match.
+
 2006-12-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (build_modrm_byte): Set the Operand_PCrel
index 959afe67e5f407b4b05e43d13768a2eec27eb792..3b54ed5899c6c16f83aba26859088919ab6f67d8 100644 (file)
@@ -2734,10 +2734,14 @@ match_template ()
          else
            {
              /* Found a forward 2 operand match here.  */
-             if (t->operands > 2)
-               overlap2 = i.types[2] & operand_types[2];
-             if (t->operands > 3)
-               overlap3 = i.types[3] & operand_types[3];
+             switch (t->operands)
+               {
+               case 4:
+                 overlap3 = i.types[3] & operand_types[3];
+               case 3:
+                 overlap2 = i.types[2] & operand_types[2];
+                 break;
+               }
 
              switch (t->operands)
                {