pa32-regs.h (HARD_REGNO_MODE_OK): Revise sets of general registers used for DImode...
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Sun, 12 May 2002 00:01:54 +0000 (00:01 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 12 May 2002 00:01:54 +0000 (00:01 +0000)
* pa/pa32-regs.h (HARD_REGNO_MODE_OK): Revise sets of general registers
used for DImode and TImode.

From-SVN: r53387

gcc/ChangeLog
gcc/config/pa/pa32-regs.h

index 0ef43a3ff0b67c27d739ccb4feba7f08cbe1c8d8..d02a3a542de8bb4e4289631e32cfb3b18465035e 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-11  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.
+
 2002-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cpplex.c (_cpp_lex_direct): When in a directive at EOF
index 2cd015452390f0deed7b8036eb3cfd3549bb9708..19553c95f38d34e1610e823e5a3d38b9b10483a8 100644 (file)
    : ((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 general register that includes the incoming arguments
+   and the return value.  We specify a set with no overlaps so that we don't
+   have to specify that the destination register in patterns using this mode
+   is an early clobber.  */
 #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.  */   \
      ? 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.