This is the mail archive of the gcc@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: CLOBBER MEM in stack ops on x86


    > Won't that happen due to the dependency on SP itself?

    Not necessarily.  Consider if a stack frame address has been
    saved in a register.

If I understand the issue you are raising correctly, why is this problem
unique to the epilogue?

There are blocks that allocate stack space and then at the end of the block
restore SP to the value at the start of the block: we do this as part of
block cleanup.  What prevents stores into the allocated area from being
scheduled past that SP restore?

If we're going to do this, I think we need to teach the scheduler about the
dependence of any memory reference to an adjustment of SP, not kludge a
few of the cases.


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