This is the mail archive of the
mailing list for the GCC project.
Re: CLOBBER MEM in stack ops on x86
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 21 Nov 01 21:18:52 EST
- Subject: 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.