* config/tc-sh.c (md_assemble): Call as_bad when there are excess
authorJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 5 Aug 1999 22:09:04 +0000 (22:09 +0000)
committerJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 5 Aug 1999 22:09:04 +0000 (22:09 +0000)
operands.

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

index 2c8d3ee1550e11ceddbf1768555f51765caf2e9a..cf83c5644c5404a0f2d811023737822897964f7e 100644 (file)
@@ -1,3 +1,8 @@
+Thu Aug  5 23:05:56 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
+
+       * config/tc-sh.c (md_assemble):  Call as_bad when there are excess
+       operands.
+
 1999-08-05  Donn Terry  <donn@interix.com>
 
        * config/te-interix.h: New file.
index 2752d031cb38b1ab9f7cb722d55cf20c1f1f755b..9f7a6c1cca49ca383550b99b83473a3eb85fcd64 100644 (file)
@@ -1066,9 +1066,16 @@ md_assemble (str)
     }
   else
     {
-      if (opcode->arg[0] != A_END)
+      if (opcode->arg[0] == A_END)
        {
-         get_operands (opcode, op_end, operand);
+         /* Ignore trailing whitespace.  If there is any, it has already
+            been compressed to a single space.  */
+         if (*op_end == ' ')
+           op_end++;
+       }
+      else
+       {
+         op_end = get_operands (opcode, op_end, operand);
        }
       opcode = get_specific (opcode, operand);
 
@@ -1083,6 +1090,9 @@ md_assemble (str)
          return;
        }
 
+      if (*op_end)
+       as_bad (_("excess operands: '%s'"), op_end);
+
       build_Mytes (opcode, operand);
     }