* config/tc-hppa.c (hppa_regname_to_dw2regnum): Add register name to
authorDave Anglin <dave.anglin@nrc.ca>
Tue, 9 Sep 2008 00:53:35 +0000 (00:53 +0000)
committerDave Anglin <dave.anglin@nrc.ca>
Tue, 9 Sep 2008 00:53:35 +0000 (00:53 +0000)
number support for 32-bit targets.

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

index da24ac6f78aebdc8edf3748985ab1281852a8725..dea89aa70b70c2e2f85f5f30ad275d1e5fb0f8d0 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * config/tc-hppa.c (hppa_regname_to_dw2regnum): Add register name to
+       number support for 32-bit targets.
+
 2008-09-08  Tristan Gingold  <gingold@adacore.com>
 
        * NEWS: Add a marker for the 2.19 features.
index da84526fa9513ccf01aa9d27dc8c62f249b7b583..7bb7966141f1dd9daa16e675add61073db8fcb29 100644 (file)
@@ -8676,9 +8676,19 @@ hppa_regname_to_dw2regnum (char *regname)
     {
       p = regname + 2;
       regnum = strtoul (p, &q, 10);
+#if TARGET_ARCH_SIZE == 64
       if (p == q || *q || regnum <= 4 || regnum >= 32)
        return -1;
       regnum += 32 - 4;
+#else
+      if (p == q
+         || (*q  && ((*q != 'L' && *q != 'R') || *(q + 1)))
+         || regnum <= 4 || regnum >= 32)
+       return -1;
+      regnum = (regnum - 4) * 2 + 32;
+      if (*q == 'R')
+       regnum++;
+#endif
     }
   return regnum;
 }