Commit 014baade by Ian Lance Taylor Committed by Ian Lance Taylor

i386.c (ix86_expand_split_stack_prologue): Add REG_ARGS_SIZE note to 32-bit push…

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
parent 19bdccb4
2017-01-31 Ian Lance Taylor <iant@golang.org>
* 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 <dmalcolm@redhat.com> 2017-01-31 David Malcolm <dmalcolm@redhat.com>
PR preprocessor/79210 PR preprocessor/79210
......
...@@ -14944,6 +14944,7 @@ ix86_expand_split_stack_prologue (void) ...@@ -14944,6 +14944,7 @@ ix86_expand_split_stack_prologue (void)
allocate_rtx = GEN_INT (allocate); allocate_rtx = GEN_INT (allocate);
args_size = crtl->args.size >= 0 ? crtl->args.size : 0; args_size = crtl->args.size >= 0 ? crtl->args.size : 0;
call_fusage = NULL_RTX; call_fusage = NULL_RTX;
rtx pop = NULL_RTX;
if (TARGET_64BIT) if (TARGET_64BIT)
{ {
rtx reg10, reg11; rtx reg10, reg11;
...@@ -15021,13 +15022,18 @@ ix86_expand_split_stack_prologue (void) ...@@ -15021,13 +15022,18 @@ ix86_expand_split_stack_prologue (void)
} }
else else
{ {
emit_insn (gen_push (GEN_INT (args_size))); rtx_insn *insn = emit_insn (gen_push (GEN_INT (args_size)));
emit_insn (gen_push (allocate_rtx)); 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), call_insn = ix86_expand_call (NULL_RTX, gen_rtx_MEM (QImode, fn),
GEN_INT (UNITS_PER_WORD), constm1_rtx, GEN_INT (UNITS_PER_WORD), constm1_rtx,
NULL_RTX, false); pop, false);
add_function_usage_to (call_insn, call_fusage); 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 /* In order to make call/return prediction work right, we now need
to execute a return instruction. See to execute a return instruction. See
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment