2001-06-08 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jun 2001 05:01:29 +0000 (05:01 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jun 2001 05:01:29 +0000 (05:01 +0000)
* config/tc-mips.c (mips_ip): Properly handle illegal operands.

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

index 5247678e993429135073cd7f084d28f0765ab34f..ae2cd9c5508202c83d14e2373b9c88f0008fc390 100644 (file)
@@ -1,3 +1,7 @@
+2001-06-08  H.J. Lu  <hjl@gnu.org>
+
+       * config/tc-mips.c (mips_ip): Properly handle illegal operands.
+
 2001-06-08  H.J. Lu  <hjl@gnu.org>
 
        * config/tc-mips.c (md_apply_fix): Don't adjust common
index 6ffe65bc9dd90128b622fd5bd6d1f64a81437c3e..b61d01c4d93e3a947397ff254e4273257baa13db 100644 (file)
@@ -7098,19 +7098,25 @@ mips_ip (str, ip)
            }
          else
            {
-             static char buf[100];
-             sprintf (buf,
-                      _("opcode not supported on this processor: %s (%s)"),
-                      mips_cpu_to_str (mips_cpu),
-                      mips_isa_to_str (mips_opts.isa));
+             if (!insn_error)
+               {
+                 static char buf[100];
+                 sprintf (buf,
+                          _("opcode not supported on this processor: %s (%s)"),
+                          mips_cpu_to_str (mips_cpu),
+                          mips_isa_to_str (mips_opts.isa));
 
-             insn_error = buf;
+                 insn_error = buf;
+               }
+             if (save_c)
+               *(--s) = save_c;
              return;
            }
        }
 
       ip->insn_mo = insn;
       ip->insn_opcode = insn->match;
+      insn_error = NULL;
       for (args = insn->args;; ++args)
        {
          if (*s == ' ')
@@ -7951,8 +7957,11 @@ mips_ip (str, ip)
        {
          ++insn;
          s = argsStart;
+         insn_error = _("illegal operands");
          continue;
        }
+      if (save_c)
+       *(--s) = save_c;
       insn_error = _("illegal operands");
       return;
     }