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] |
On Mon, Apr 30, 2001 at 07:59:41AM -0700, Mark Mitchell wrote:
> In looking at it carefully, I think the extended asm is bogus. In
> particular, we have:
>
> ! asm volatile("call ___checkme" : : "c" (x) : "memory");
>
> where `__checkme' is a function which fiddles around with the stack.
> The asm doesn't clobber the stack pointer, which is wrong; GCC has no
> way to know that this instruction messes with that register.
This analysis is incorrect, as far as I can tell. The asm
does not need to describe the change in the stack pointer
because it should have the same value before and after.
Yes, the call pushes a return address, but the ret in checkme
removes it.
The actual flaw is that we've lost track of the fact that
there is an outstanding reference to a stack address in a
register, and we decide that we can deallocate the stack
frame before that reference is used.
r~
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |