This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question regarding regrename and failure of 950704-1.c on main
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: law at redhat dot com
- Cc: rth at redhat dot com, gcc at gcc dot gnu dot org
- Date: Fri, 10 May 2002 16:01:47 -0400 (EDT)
- Subject: Re: question regarding regrename and failure of 950704-1.c on main
> Twiddling HARD_REGNO_MODE_OK to switch from even regs to odd regs probably
> does make sense for the mainline, but not for the branch. We'll still
> need some register shuffling for the return value, but it should be less
> than the amount we're currently doing for input arguments.
This is the patch that I am testing. I have checked that it fixes
the fail of 950704-1.c at -O2. I believe it handles the shuffling
needed for the return of DImode values. It'll be a couple of hours
before I know how the testsuite works out.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-0510 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa/pa32-regs.h (HARD_REGNO_MODE_OK): Revise sets of general registers
used for DImode and TImode values.
Index: config/pa/pa32-regs.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa32-regs.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 pa32-regs.h
--- config/pa/pa32-regs.h 11 Nov 2001 17:45:02 -0000 1.9
+++ config/pa/pa32-regs.h 10 May 2002 19:22:03 -0000
@@ -164,8 +164,9 @@
: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
- On the HP-PA, the cpu registers can hold any mode. We
- force this to be an even register is it cannot hold the full mode. */
+ On the HP-PA, the cpu registers can hold any mode. For DImode, we
+ choose a set of registers that includes the incoming arguments and
+ return value. */
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
((REGNO) == 0 ? (MODE) == CCmode || (MODE) == CCFPmode \
/* On 1.0 machines, don't allow wide non-fp modes in fp regs. */ \
@@ -173,9 +174,11 @@
? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT \
: FP_REGNO_P (REGNO) \
? GET_MODE_SIZE (MODE) <= 4 || ((REGNO) & 1) == 0 \
- /* Make wide modes be in aligned registers. */ \
: (GET_MODE_SIZE (MODE) <= UNITS_PER_WORD \
- || (GET_MODE_SIZE (MODE) <= 4 * UNITS_PER_WORD && ((REGNO) & 1) == 0)))
+ || (GET_MODE_SIZE (MODE) == 2 * UNITS_PER_WORD \
+ && ((((REGNO) & 1) == 1 && (REGNO) <= 25) || (REGNO) == 28)) \
+ || (GET_MODE_SIZE (MODE) == 4 * UNITS_PER_WORD \
+ && (((REGNO) & 3) == 3 && (REGNO) <= 23))))
/* How to renumber registers for dbx and gdb.