pa.c (compute_frame_size): Use UNITS_PER_WORD instead of hardwired value of 4.
authorJeffrey A Law <law@cygnus.com>
Fri, 16 Jul 1999 20:35:08 +0000 (20:35 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 16 Jul 1999 20:35:08 +0000 (14:35 -0600)
        * pa.c (compute_frame_size): Use UNITS_PER_WORD instead of hardwired
        value of 4.  Allocate 8 bytes for each FP register save.
        (hppa_expand_epilogue): Use UNITS_PER_WORD instead of harwarewired
        value of 4.
        (hppa_expand_prologue): Likewise.
        * pa.h (PROMOTE_MODE): Likewise.
        (HARD_REGNO_MODE_OK, FUNCTION_ARG_SIZE): Likewise.
        (FUNCTION_ARG_BOUNDARY): Likewise.

From-SVN: r28127

gcc/ChangeLog
gcc/config/pa/pa.c
gcc/config/pa/pa.h

index 5db0760ad552fcdd3675511a0386032733c2bf26..0e110c664ca65d485feefe169147e36ee1e6b321 100644 (file)
@@ -1,5 +1,14 @@
 Fri Jul 16 13:48:09 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * pa.c (compute_frame_size): Use UNITS_PER_WORD instead of hardwired
+       value of 4.  Allocate 8 bytes for each FP register save.
+       (hppa_expand_epilogue): Use UNITS_PER_WORD instead of harwarewired
+       value of 4.
+       (hppa_expand_prologue): Likewise.
+       * pa.h (PROMOTE_MODE): Likewise.
+       (HARD_REGNO_MODE_OK, FUNCTION_ARG_SIZE): Likewise.
+       (FUNCTION_ARG_BOUNDARY): Likewise.
+
        * invoke.texi (HPPA Options): Remove -mspace/-mno-space.
 
        * pa.c (out_of_line_prologue_epilogue): Delete.
index af748e08a7bb80bdff8cad7bf9861edcd224ff08..a931857bda8bd5f6db1b630a616d65e57afb9190 100644 (file)
@@ -2559,7 +2559,7 @@ compute_frame_size (size, fregs_live)
   for (i = 18; i >= 3; i--)
     if (regs_ever_live[i])
       {
-       fsize += 4;
+       fsize += UNITS_PER_WORD;
        break;
       }
 
@@ -2572,7 +2572,7 @@ compute_frame_size (size, fregs_live)
        if (fregs_live)
          *fregs_live = 1;
 
-       fsize += 4;
+       fsize += 8;
        break;
       }
 
@@ -2807,7 +2807,7 @@ hppa_expand_prologue()
        if (regs_ever_live[i] && ! call_used_regs[i])
          {
            store_reg (i, offset, FRAME_POINTER_REGNUM);
-           offset += 4;
+           offset += UNITS_PER_WORD;
            gr_saved++;
          }
       /* Account for %r3 which is saved in a special place.  */
@@ -2830,7 +2830,7 @@ hppa_expand_prologue()
              }
            else
              store_reg (i, offset, STACK_POINTER_REGNUM);
-           offset += 4;
+           offset += UNITS_PER_WORD;
            gr_saved++;
          }
 
@@ -2958,7 +2958,7 @@ hppa_expand_epilogue ()
        if (regs_ever_live[i] && ! call_used_regs[i])
          {
            load_reg (i, offset, FRAME_POINTER_REGNUM);
-           offset += 4;
+           offset += UNITS_PER_WORD;
          }
     }
   else
@@ -2976,7 +2976,7 @@ hppa_expand_epilogue ()
                merge_sp_adjust_with_load = i;
              else
                load_reg (i, offset, STACK_POINTER_REGNUM);
-             offset += 4;
+             offset += UNITS_PER_WORD;
            }
        }
     }
index 8132c7bfbcea32a03279cd5b4950298b2c37f3b3..1f9a9179cd81482350670d28cdae5750a120ab0c 100644 (file)
@@ -319,7 +319,7 @@ int lhs_lshift_cint_operand ();
 
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \
   if (GET_MODE_CLASS (MODE) == MODE_INT        \
-      && GET_MODE_SIZE (MODE) < 4)     \
+      && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)        \
     (MODE) = SImode;
 
 /* Define this if most significant bit is lowest numbered
@@ -578,7 +578,7 @@ int lhs_lshift_cint_operand ();
    : !TARGET_PA_11 && FP_REGNO_P (REGNO)                               \
      ? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT        \
    /* Make wide modes be in aligned registers. */                      \
-   : GET_MODE_SIZE (MODE) <= 4 || ((REGNO) & 1) == 0)
+   : GET_MODE_SIZE (MODE) <= UNITS_PER_WORD || ((REGNO) & 1) == 0)
 
 /* Value is 1 if it is a good idea to tie two pseudo registers
    when one has mode MODE1 and one has mode MODE2.
@@ -938,7 +938,9 @@ struct hppa_args {int words, nargs_prototype, indirect; };
 /* Figure out the size in words of the function argument. */
 
 #define FUNCTION_ARG_SIZE(MODE, TYPE)  \
-  ((((MODE) != BLKmode ? GET_MODE_SIZE (MODE) : int_size_in_bytes (TYPE))+3)/4)
+  ((((MODE) != BLKmode \
+     ? GET_MODE_SIZE (MODE) \
+     : int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
 /* Update the data in CUM to advance over an argument
    of mode MODE and data type TYPE.
@@ -1057,7 +1059,8 @@ struct hppa_args {int words, nargs_prototype, indirect; };
 
 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)                              \
   (((TYPE) != 0)                                                       \
-       ? (((int_size_in_bytes (TYPE)) + 3) / 4) * BITS_PER_WORD        \
+       ? (((int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1)            \
+          / UNITS_PER_WORD) * BITS_PER_WORD                            \
        : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)                  \
                ? PARM_BOUNDARY                                         \
                : GET_MODE_ALIGNMENT(MODE)))