This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/24419: ix86 prologue clobbers memory when it shouldn't


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]