From 2b48966149db082c8643268316d8582506c1caac Mon Sep 17 00:00:00 2001 From: Dave Anglin Date: Tue, 9 Sep 2008 00:53:35 +0000 Subject: [PATCH] * config/tc-hppa.c (hppa_regname_to_dw2regnum): Add register name to number support for 32-bit targets. --- gas/ChangeLog | 5 +++++ gas/config/tc-hppa.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index da24ac6f78a..dea89aa70b7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2008-09-08 John David Anglin + + * config/tc-hppa.c (hppa_regname_to_dw2regnum): Add register name to + number support for 32-bit targets. + 2008-09-08 Tristan Gingold * NEWS: Add a marker for the 2.19 features. diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index da84526fa95..7bb7966141f 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; } -- 2.30.2