*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Fri, 15 May 1992 05:23:58 +0000 (05:23 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 15 May 1992 05:23:58 +0000 (05:23 +0000)
From-SVN: r985

gcc/function.c

index 602544f1fd4a42d13ca0cef5b37cc0ffa963cdb2..c2fc5e86a4fa58149e4301db6e7365cdd44f4210 100644 (file)
@@ -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;