This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed 3.5] Fix DBX register numbering for hppa64
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Wed, 21 Apr 2004 15:23:01 -0400 (EDT)
- Subject: Re: [committed 3.5] Fix DBX register numbering for hppa64
Mark,
Is this ok for the 3.4 branch? It fixes a couple of register numbering
issues on hppa64 with respect to the shift amount register (cr11).
This appears to be a cut and paste error and it probably has been around
from the beginning of the hppa64 port. Thus, it's just a bug.
I believe that this change is safe. It only affects hppa64. The
change has been tested with 3.4 and 3.5 on hppa64-hp-hpux11.00.
> 2004-04-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
>
> * pa64-regs.h (DBX_REGISTER_NUMBER): Simplify and correct mapping of
> SAR register. Fix comment.
> (ADDITIONAL_REGISTER_NAMES): Correct register number of SAR register
> (%cr11).
>
> Index: config/pa/pa64-regs.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/pa/pa64-regs.h,v
> retrieving revision 1.15
> diff -u -3 -p -r1.15 pa64-regs.h
> --- config/pa/pa64-regs.h 15 Mar 2004 18:20:49 -0000 1.15
> +++ config/pa/pa64-regs.h 16 Apr 2004 14:53:42 -0000
> @@ -169,13 +169,11 @@ Boston, MA 02111-1307, USA. */
>
> Registers 0 - 31 remain unchanged.
>
> - Registers 32 - 60 are mapped to 72, 74, 76 ...
> -
> - Register 88 is mapped to 32. */
> + Registers 32 - 59 are mapped to 72, 74, 76 ...
>
> + Register 60 is mapped to 32. */
> #define DBX_REGISTER_NUMBER(REGNO) \
> - ((REGNO) <= 31 ? (REGNO) : \
> - ((REGNO) > 31 && (REGNO) <= 60 ? (REGNO - 32) * 2 + 72 : 32))
> + ((REGNO) <= 31 ? (REGNO) : ((REGNO) < 60 ? (REGNO - 32) * 2 + 72 : 32))
>
> /* We must not use the DBX register numbers for the DWARF 2 CFA column
> numbers because that maps to numbers beyond FIRST_PSEUDO_REGISTER.
> @@ -292,7 +290,7 @@ enum reg_class { NO_REGS, R1_REGS, GENER
> "%fr28", "%fr29", "%fr30", "%fr31", "SAR"}
>
> #define ADDITIONAL_REGISTER_NAMES \
> - {{"%cr11",88}}
> + {{"%cr11",60}}
>
> #define FP_SAVED_REG_LAST 49
> #define FP_SAVED_REG_FIRST 40
>
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)