aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-05-15 05:23:58 +0000
committerRichard Stallman <rms@gnu.org>1992-05-15 05:23:58 +0000
commite16c591a119cfadadb854ee51dffc724d9ee97f8 (patch)
tree2cd9a2ba7bb7a66cefc41a9b5d7e29eea069a2cc
parent611314a17ddd1e3f619e44ab9a745751fdafb2a9 (diff)
downloadgcc-e16c591a119cfadadb854ee51dffc724d9ee97f8.zip
gcc-e16c591a119cfadadb854ee51dffc724d9ee97f8.tar.gz
gcc-e16c591a119cfadadb854ee51dffc724d9ee97f8.tar.bz2
*** empty log message ***
From-SVN: r985
-rw-r--r--gcc/function.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 602544f..c2fc5e8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2710,6 +2710,21 @@ assign_parms (fndecl, second_time)
if (second_time)
continue;
+ /* If we can't trust the parm stack slot to be aligned enough
+ for its ultimate type, don't use that slot after entry.
+ We'll make another stack slot, if we need one. */
+ {
+#ifdef FUNCTION_ARG_BOUNDARY
+ int thisparm_boundary
+ = FUNCTION_ARG_BOUNDARY (passed_mode, passed_type);
+#else
+ int thisparm_boundary = PARM_BOUNDARY;
+#endif
+
+ if (GET_MODE_ALIGNMENT (nominal_mode) > thisparm_boundary)
+ stack_parm = 0;
+ }
+
/* Now adjust STACK_PARM to the mode and precise location
where this parameter should live during execution,
if we discover that it must live in the stack during execution.
@@ -2856,6 +2871,7 @@ assign_parms (fndecl, second_time)
as we make here would screw up life analysis for it. */
if (nominal_mode == passed_mode
&& GET_CODE (entry_parm) == MEM
+ && entry_parm == stack_parm
&& stack_offset.var == 0
&& reg_mentioned_p (virtual_incoming_args_rtx,
XEXP (entry_parm, 0)))
@@ -3088,6 +3104,9 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
#endif /* ARGS_GROW_DOWNWARD */
}
+/* Round the stack offset in *OFFSET_PTR up to a multiple of BOUNDARY.
+ BOUNDARY is measured in bits, but must be a multiple of a storage unit. */
+
static void
pad_to_arg_alignment (offset_ptr, boundary)
struct args_size *offset_ptr;