diff options
author | Richard Henderson <rth@redhat.com> | 2014-02-10 17:12:38 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2014-02-10 17:12:38 -0800 |
commit | f830ddc257d1d708801f1a42b181f462da14637a (patch) | |
tree | 2578973d4cdade0f80d29d8d2dd1672a865ddc1e /gcc | |
parent | 636109955cf4bee3387565546a365976e7b49f09 (diff) | |
download | gcc-f830ddc257d1d708801f1a42b181f462da14637a.zip gcc-f830ddc257d1d708801f1a42b181f462da14637a.tar.gz gcc-f830ddc257d1d708801f1a42b181f462da14637a.tar.bz2 |
re PR target/59927 (ICE sorry, unimplemented: ms_abi attribute requires -maccumulate-outgoing-args or subtarget optimization implying it)
PR target/59927
* calls.c (expand_call): Don't double-push for reg_parm_stack_space.
* config/i386/i386.c (init_cumulative_args): Remove sorry for 64-bit
ms-abi vs -mno-accumulate-outgoing-args.
(ix86_expand_prologue): Unconditionally call ix86_eax_live_at_start_p.
* config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Fix comment with
respect to ms-abi.
From-SVN: r207677
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/calls.c | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 11 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 10 |
4 files changed, 19 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a5ad4fa..4522482 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-02-10 Richard Henderson <rth@redhat.com> + + PR target/59927 + * calls.c (expand_call): Don't double-push for reg_parm_stack_space. + * config/i386/i386.c (init_cumulative_args): Remove sorry for 64-bit + ms-abi vs -mno-accumulate-outgoing-args. + (ix86_expand_prologue): Unconditionally call ix86_eax_live_at_start_p. + * config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Fix comment with + respect to ms-abi. + 2014-02-10 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/60080 diff --git a/gcc/calls.c b/gcc/calls.c index d574a95..f392319 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1b7bb3e..0a15e44 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 0e757c9c..b605ae2 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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 |