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]

Re: PATCH: Fix 20000724-1.c


On Mon, Apr 30, 2001 at 02:03:10PM -0700, Mark Mitchell wrote:
> >>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
> 
>     Jakub> But the pushes there are just to simulate real-world
>     Jakub> situation where the current task sleeps in between the
>     Jakub> stack adjustement and the end of the asm volatile. If the
>     Jakub> task sleeps inside of the kernel, then everything below
>     Jakub> current %esp can be clobered, likewise if a task sleeps and
>     Jakub> during the sleep a signal is sent to it (and is not using
>     Jakub> alternate stack).  So the asm does not have to use "memory"
>     Jakub> clobber to get area below stack pointer clobbered.
> 
> Right; that comes from the bit in the manual I didn't find until my
> last message that says a volatile asm can do anything it wants
> *without* describing what it's doing.
> 
> It's clear to me, then, that we can't combine stack adjustments across
> one of these.  A volatile asm could, for example, fiddle with the
> stack pointer without explicitly clobberring it; that would be legal
> by the semantics in the manual.
> 
> Once someone confirms that, then I know how to fix the bug.

How different is it from the regmove.c hunk I posted (either with additional
volatile_insn_p() check or volatile_insn_p() alone (if we would not like to
combine accross UNSPEC_VOLATILE as well))?

	Jakub


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