2009-01-06 Chao-ying Fu <fu@mips.com>
authorChao-ying Fu <fu@mips.com>
Tue, 6 Jan 2009 19:22:11 +0000 (19:22 +0000)
committerChao-ying Fu <fu@mips.com>
Tue, 6 Jan 2009 19:22:11 +0000 (19:22 +0000)
* config/tc-mips.c (mips_ip): Set lastregno to 0xffffffff.
Use strncmp to match jalr and jalr.hb.
Fix a typo.

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

index bc5540771860f93e1475899bbaf9bbfe038e077a..cfb6fd39a643f91899062a7babb49ff72d20fc88 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-06  Chao-ying Fu  <fu@mips.com>
+
+       * config/tc-mips.c (mips_ip): Set lastregno to 0xffffffff.
+       Use strncmp to match jalr and jalr.hb.
+       Fix a typo.
+
 2009-01-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        AVX Programming Reference (December, 2008)
index c472509069f8b97b992af65439172fa74536034a..bc6248672d75ac028809e8863536de29831b611e 100644 (file)
@@ -8656,6 +8656,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
       create_insn (ip, insn);
       insn_error = NULL;
       argnum = 1;
+      lastregno = 0xffffffff;
       for (args = insn->args;; ++args)
        {
          int is_mdmx;
@@ -9397,14 +9398,14 @@ do_msbd:
                  if (c == 'z' && regno != 0)
                    break;
 
-                 if (c == 's' && !strcmp (ip->insn_mo->name, "jalr"))
+                 if (c == 's' && !strncmp (ip->insn_mo->name, "jalr", 4))
                    {
                      if (regno == lastregno)
                        {
-                         insn_error = _("source and destinationations must be different");
+                         insn_error = _("source and destination must be different");
                          continue;
                        }
-                     if (regno == 31 && lastregno == 0)
+                     if (regno == 31 && lastregno == 0xffffffff)
                        {
                          insn_error = _("a destination register must be supplied");
                          continue;