@@ -2955,6 +2955,7 @@ expand_call (tree exp, rtx target, int ignore)
/* If we push args individually in reverse order, perform stack alignment
before the first push (the last arg). */
if (PUSH_ARGS_REVERSED && argblock == 0
+ && adjusted_args_size.constant > reg_parm_stack_space
&& adjusted_args_size.constant != unadjusted_args_size)
{
/* When the stack adjustment is pending, we get better code
@@ -6110,10 +6110,6 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->caller = caller;
/* Set up the number of registers to use for passing arguments. */
-
- if (TARGET_64BIT && cum->call_abi == MS_ABI && !ACCUMULATE_OUTGOING_ARGS)
- sorry ("ms_abi attribute requires -maccumulate-outgoing-args "
- "or subtarget optimization implying it");
cum->nregs = ix86_regparm;
if (TARGET_64BIT)
{
@@ -11032,15 +11028,14 @@ ix86_expand_prologue (void)
if (TARGET_64BIT)
r10_live = (DECL_STATIC_CHAIN (current_function_decl) != 0);
- if (!TARGET_64BIT_MS_ABI)
- eax_live = ix86_eax_live_at_start_p ();
- /* Note that SEH directives need to continue tracking the stack
- pointer even after the frame pointer has been set up. */
+ eax_live = ix86_eax_live_at_start_p ();
if (eax_live)
{
insn = emit_insn (gen_push (eax));
allocate -= UNITS_PER_WORD;
+ /* Note that SEH directives need to continue tracking the stack
+ pointer even after the frame pointer has been set up. */
if (sp_is_cfa_reg || TARGET_SEH)
{
if (sp_is_cfa_reg)
@@ -1537,12 +1537,12 @@ enum reg_class
mode the difference is less drastic but visible.
FIXME: Unlike earlier implementations, the size of unwind info seems to
- actually grouw with accumulation. Is that because accumulated args
+ actually grow with accumulation. Is that because accumulated args
unwind info became unnecesarily bloated?
-
- 64-bit MS ABI seem to require 16 byte alignment everywhere except for
- function prologue and epilogue. This is not possible without
- ACCUMULATE_OUTGOING_ARGS.
+
+ With the 64-bit MS ABI, we can generate correct code with or without
+ accumulated args, but because of OUTGOING_REG_PARM_STACK_SPACE the code
+ generated without accumulated args is terrible.
If stack probes are required, the space used for large function
arguments on the stack must also be probed, so enable