diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2008-09-09 00:53:35 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2008-09-09 00:53:35 +0000 |
commit | 4d7e26689206a6efc1f3352687a4a47362e2882b (patch) | |
tree | b3edbafe6e0e31bd94a9ebdd9594a2cb2a197818 /gas | |
parent | e1482488cdf7d91b0cfb4478799441b84d293461 (diff) | |
download | binutils-redhat-4d7e26689206a6efc1f3352687a4a47362e2882b.tar.gz |
* config/tc-hppa.c (hppa_regname_to_dw2regnum): Add register name to
number support for 32-bit targets.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-hppa.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index da24ac6f78..dea89aa70b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index da84526fa9..7bb7966141 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -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; } |