Commit d7735a07 by Jeffrey A Law Committed by Jeff Law

pa.c (compute_frame_size): Use UNITS_PER_WORD instead of hardwired value of 4.

        * 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
parent c8730d93
Fri Jul 16 13:48:09 1999 Jeffrey A Law (law@cygnus.com) 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. * invoke.texi (HPPA Options): Remove -mspace/-mno-space.
* pa.c (out_of_line_prologue_epilogue): Delete. * pa.c (out_of_line_prologue_epilogue): Delete.
......
...@@ -2559,7 +2559,7 @@ compute_frame_size (size, fregs_live) ...@@ -2559,7 +2559,7 @@ compute_frame_size (size, fregs_live)
for (i = 18; i >= 3; i--) for (i = 18; i >= 3; i--)
if (regs_ever_live[i]) if (regs_ever_live[i])
{ {
fsize += 4; fsize += UNITS_PER_WORD;
break; break;
} }
...@@ -2572,7 +2572,7 @@ compute_frame_size (size, fregs_live) ...@@ -2572,7 +2572,7 @@ compute_frame_size (size, fregs_live)
if (fregs_live) if (fregs_live)
*fregs_live = 1; *fregs_live = 1;
fsize += 4; fsize += 8;
break; break;
} }
...@@ -2807,7 +2807,7 @@ hppa_expand_prologue() ...@@ -2807,7 +2807,7 @@ hppa_expand_prologue()
if (regs_ever_live[i] && ! call_used_regs[i]) if (regs_ever_live[i] && ! call_used_regs[i])
{ {
store_reg (i, offset, FRAME_POINTER_REGNUM); store_reg (i, offset, FRAME_POINTER_REGNUM);
offset += 4; offset += UNITS_PER_WORD;
gr_saved++; gr_saved++;
} }
/* Account for %r3 which is saved in a special place. */ /* Account for %r3 which is saved in a special place. */
...@@ -2830,7 +2830,7 @@ hppa_expand_prologue() ...@@ -2830,7 +2830,7 @@ hppa_expand_prologue()
} }
else else
store_reg (i, offset, STACK_POINTER_REGNUM); store_reg (i, offset, STACK_POINTER_REGNUM);
offset += 4; offset += UNITS_PER_WORD;
gr_saved++; gr_saved++;
} }
...@@ -2958,7 +2958,7 @@ hppa_expand_epilogue () ...@@ -2958,7 +2958,7 @@ hppa_expand_epilogue ()
if (regs_ever_live[i] && ! call_used_regs[i]) if (regs_ever_live[i] && ! call_used_regs[i])
{ {
load_reg (i, offset, FRAME_POINTER_REGNUM); load_reg (i, offset, FRAME_POINTER_REGNUM);
offset += 4; offset += UNITS_PER_WORD;
} }
} }
else else
...@@ -2976,7 +2976,7 @@ hppa_expand_epilogue () ...@@ -2976,7 +2976,7 @@ hppa_expand_epilogue ()
merge_sp_adjust_with_load = i; merge_sp_adjust_with_load = i;
else else
load_reg (i, offset, STACK_POINTER_REGNUM); load_reg (i, offset, STACK_POINTER_REGNUM);
offset += 4; offset += UNITS_PER_WORD;
} }
} }
} }
......
...@@ -319,7 +319,7 @@ int lhs_lshift_cint_operand (); ...@@ -319,7 +319,7 @@ int lhs_lshift_cint_operand ();
#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
if (GET_MODE_CLASS (MODE) == MODE_INT \ if (GET_MODE_CLASS (MODE) == MODE_INT \
&& GET_MODE_SIZE (MODE) < 4) \ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
(MODE) = SImode; (MODE) = SImode;
/* Define this if most significant bit is lowest numbered /* Define this if most significant bit is lowest numbered
...@@ -578,7 +578,7 @@ int lhs_lshift_cint_operand (); ...@@ -578,7 +578,7 @@ int lhs_lshift_cint_operand ();
: !TARGET_PA_11 && FP_REGNO_P (REGNO) \ : !TARGET_PA_11 && FP_REGNO_P (REGNO) \
? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT \ ? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT \
/* Make wide modes be in aligned registers. */ \ /* 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 /* Value is 1 if it is a good idea to tie two pseudo registers
when one has mode MODE1 and one has mode MODE2. when one has mode MODE1 and one has mode MODE2.
...@@ -938,7 +938,9 @@ struct hppa_args {int words, nargs_prototype, indirect; }; ...@@ -938,7 +938,9 @@ struct hppa_args {int words, nargs_prototype, indirect; };
/* Figure out the size in words of the function argument. */ /* Figure out the size in words of the function argument. */
#define FUNCTION_ARG_SIZE(MODE, TYPE) \ #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 /* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE. of mode MODE and data type TYPE.
...@@ -1057,7 +1059,8 @@ struct hppa_args {int words, nargs_prototype, indirect; }; ...@@ -1057,7 +1059,8 @@ struct hppa_args {int words, nargs_prototype, indirect; };
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
(((TYPE) != 0) \ (((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) \ : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \
? PARM_BOUNDARY \ ? PARM_BOUNDARY \
: GET_MODE_ALIGNMENT(MODE))) : GET_MODE_ALIGNMENT(MODE)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment