From: Ian Lance Taylor Date: Tue, 31 Jan 2017 23:49:26 +0000 (+0000) Subject: i386.c (ix86_expand_split_stack_prologue): Add REG_ARGS_SIZE note to 32-bit push... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=014baadeaf43d66fd8a881b89d0fd2e139474645;p=gcc.git i386.c (ix86_expand_split_stack_prologue): Add REG_ARGS_SIZE note to 32-bit push insns and call insn. * config/i386/i386.c (ix86_expand_split_stack_prologue): Add REG_ARGS_SIZE note to 32-bit push insns and call insn. From-SVN: r245076 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a264140a3f9..02f635ea8f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-31 Ian Lance Taylor + + * config/i386/i386.c (ix86_expand_split_stack_prologue): Add + REG_ARGS_SIZE note to 32-bit push insns and call insn. + 2017-01-31 David Malcolm PR preprocessor/79210 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 377e49a507a..01a05c63ccd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14944,6 +14944,7 @@ ix86_expand_split_stack_prologue (void) allocate_rtx = GEN_INT (allocate); args_size = crtl->args.size >= 0 ? crtl->args.size : 0; call_fusage = NULL_RTX; + rtx pop = NULL_RTX; if (TARGET_64BIT) { rtx reg10, reg11; @@ -15021,13 +15022,18 @@ ix86_expand_split_stack_prologue (void) } else { - emit_insn (gen_push (GEN_INT (args_size))); - emit_insn (gen_push (allocate_rtx)); + rtx_insn *insn = emit_insn (gen_push (GEN_INT (args_size))); + add_reg_note (insn, REG_ARGS_SIZE, GEN_INT (UNITS_PER_WORD)); + insn = emit_insn (gen_push (allocate_rtx)); + add_reg_note (insn, REG_ARGS_SIZE, GEN_INT (2 * UNITS_PER_WORD)); + pop = GEN_INT (2 * UNITS_PER_WORD); } call_insn = ix86_expand_call (NULL_RTX, gen_rtx_MEM (QImode, fn), GEN_INT (UNITS_PER_WORD), constm1_rtx, - NULL_RTX, false); + pop, false); add_function_usage_to (call_insn, call_fusage); + if (!TARGET_64BIT) + add_reg_note (call_insn, REG_ARGS_SIZE, GEN_INT (0)); /* In order to make call/return prediction work right, we now need to execute a return instruction. See