This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/24419: ix86 prologue clobbers memory when it shouldn't
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>,gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Oct 2005 19:22:58 -0700
- Subject: Re: PATCH: PR target/24419: ix86 prologue clobbers memory when it shouldn't
- References: <20051018220124.GA20019@lucon.org> <20051019015138.GA14301@redhat.com>
On Tue, Oct 18, 2005 at 06:51:38PM -0700, Richard Henderson wrote:
> On Tue, Oct 18, 2005 at 03:01:24PM -0700, H. J. Lu wrote:
> > +pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset, int style,
> > + bool clobber_memory)
>
> This is wrong. The reason that we describe a memory clobber here is
> to prevent
>
> push %ebp
> movl %esp, %ebp
> subl $100, %esp
> leal -32(%ebp), %ecx
> movl $1, (%ecx)
>
> from being rescheduled as
>
> push %ebp
> movl %esp, %ebp
> leal -32(%ebp), %ecx
> movl $1, (%ecx)
> subl $100, %esp
>
> >From the PR trail, I think you didn't actually see a problem and
> were just guessing.
This should never happen with my patch. My patch should only affect
code when red zone is enabled and mov is used in prologue, in which
case, we even are doing
movq %rbx, -16(%rsp)
movq %rbp, -8(%rsp)
subq $16, %rsp
today.
H.J.