import insight-2000-02-04 snapshot (2nd try)
[external/binutils.git] / gas / config / tc-sh.c
index e21962c..9f7a6c1 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);
     }
 
@@ -2192,12 +2202,7 @@ sh_do_align (n, fill, len, max)
      int max;
 {
   if (fill == NULL
-#ifdef BFD_ASSEMBLER
-      && (now_seg->flags & SEC_CODE) != 0
-#else
-      && now_seg != data_section
-      && now_seg != bss_section
-#endif
+      && subseg_text_p (now_seg)
       && n > 1)
     {
       static const unsigned char big_nop_pattern[] = { 0x00, 0x09 };