> > @@ -7753,8 +7762,12 @@ pro_epilogue_adjust_stack (rtx dest, rtx src,
> > rtx
> offset,
> > add_frame_related_expr = true;
> > }
> >
> > + if (crtl->shrink_wrapped_separate) insn = emit_insn (gen_rtx_SET
> > + (dest, gen_rtx_PLUS (Pmode, src, addend)));
>
> Please use ix86_expand_binary_operator here, it will correctly
> generate LEA during pro/epilogue generation. Also, please check indenting.
>
Hi Uros,
I'm confused here, ix86_expand_binary_operator cannot return insn, and insn
needs to be used later. Another thing is in ix86_expand_binary_operator, if
!rtx_equal_p (dst, src1), it will generate clobber for it.
Our case is:
DEST = %rsp;
SRC = %rsp;
Addend = offset;
void
ix86_expand_binary_operator (enum rtx_code code, machine_mode mode,
rtx operands[], bool use_ndd)
{
rtx src1, src2, dst, op, clob;
dst = ix86_fixup_binary_operands (code, mode, operands, use_ndd);
src1 = operands[1];
src2 = operands[2];
/* Emit the instruction. */
op = gen_rtx_SET (dst, gen_rtx_fmt_ee (code, mode, src1, src2));
if (reload_completed
&& code == PLUS
&& !rtx_equal_p (dst, src1)
&& !use_ndd)
{
/* This is going to be an LEA; avoid splitting it later. */
emit_insn (op);
}
else
{
clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG));
emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, op, clob)));
}
/* Fix up the destination if needed. */
if (dst != operands[0])
emit_move_insn (operands[0], dst);
}
Thanks,
Lili.