Hi! Since r163679 the pop pattern is no longer a PARALLEL, but uses POST_INC. That commit fixed another spot where REG_CFA_ADJUST_CFA note has been created from the pop insn pattern, but missed this spot which is rarely used (requires popping > 64KB arguments by callee).
Bootstrapped/regtested on x86_64-linux and i686-linux, Kai has tested this on some mingw32 or what. Ok for trunk? 2014-03-17 Jakub Jelinek <ja...@redhat.com> PR target/60516 * config/i386/i386.c (ix86_expand_epilogue): Adjust REG_CFA_ADJUST_CFA note creation for the 2010-08-31 changes. * gcc.target/i386/pr60516.c: New test. --- gcc/config/i386/i386.c.jj 2014-03-13 21:54:53.000000000 +0100 +++ gcc/config/i386/i386.c 2014-03-17 07:19:28.461411964 +0100 @@ -11708,8 +11708,9 @@ ix86_expand_epilogue (int style) m->fs.cfa_offset -= UNITS_PER_WORD; m->fs.sp_offset -= UNITS_PER_WORD; - add_reg_note (insn, REG_CFA_ADJUST_CFA, - copy_rtx (XVECEXP (PATTERN (insn), 0, 1))); + rtx x = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD); + x = gen_rtx_SET (VOIDmode, stack_pointer_rtx, x); + add_reg_note (insn, REG_CFA_ADJUST_CFA, x); add_reg_note (insn, REG_CFA_REGISTER, gen_rtx_SET (VOIDmode, ecx, pc_rtx)); RTX_FRAME_RELATED_P (insn) = 1; --- gcc/testsuite/gcc.target/i386/pr60516.c.jj 2014-03-17 07:17:14.165158703 +0100 +++ gcc/testsuite/gcc.target/i386/pr60516.c 2014-03-17 07:16:59.343275735 +0100 @@ -0,0 +1,20 @@ +/* PR target/60516 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct S { char c[65536]; }; + +__attribute__((ms_abi, thiscall)) void +foo (void *x, struct S y) +{ +} + +__attribute__((ms_abi, fastcall)) void +bar (void *x, void *y, struct S z) +{ +} + +__attribute__((ms_abi, stdcall)) void +baz (struct S x) +{ +} Jakub