Do not count FAKE operands when deciding if any operands have been skipped.
authorNick Clifton <nickc@redhat.com>
Fri, 13 Sep 2002 09:16:02 +0000 (09:16 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 13 Sep 2002 09:16:02 +0000 (09:16 +0000)
gas/ChangeLog
gas/config/tc-ppc.c

index 4f419868661b0725422fad5ef7ee0f7b2e251880..ad807bd2e748e11fdd4eada4f2c27dde8eb35080 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-13  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-ppc.c (md_assemble): Do not count FAKE operands
+       when deciding if any operands have been skipped.
+
 2002-09-11  Nick Clifton  <nickc@redhat.com>
 
        * NEWS: New TI port supports both C4x and C3x series of DSPs.
index 613a61a203c80f4265ce3db9ae1439aeb554cae1..8f89c77ff0c7fd935eae01e357562c5e352d9a52 100644 (file)
@@ -2069,6 +2069,8 @@ md_assemble (str)
       if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0)
        {
          unsigned int opcount;
+         unsigned int num_operands_expected;
+         unsigned int i;
 
          /* There is an optional operand.  Count the number of
             commas in the input line.  */
@@ -2085,10 +2087,16 @@ md_assemble (str)
                }
            }
 
+         /* Compute the number of expected operands.
+            Do not count fake operands.  */
+         for (num_operands_expected = 0, i = 0; opcode->operands[i]; i ++)
+           if ((powerpc_operands [opcode->operands[i]].flags & PPC_OPERAND_FAKE) == 0)
+             ++ num_operands_expected;
+
          /* If there are fewer operands in the line then are called
             for by the instruction, we want to skip the optional
             operand.  */
-         if (opcount < strlen (opcode->operands))
+         if (opcount < num_operands_expected)
            skip_optional = 1;
 
          break;
This page took 0.033017 seconds and 4 git commands to generate.