Re: constraints and precious operand wastage

Michael L. Galbraith (mikeg@weiden.de)
Sun, 7 Jun 1998 06:56:28 +0200 (MET DST)


On Mon, 1 Jun 1998, Michael L. Galbraith wrote:

> On Sun, 31 May 1998, Colin Plumb wrote:
>
> > Um, unfortunately that won't work. let me give a simple example:
> >
> > asm volatile("... trashing %ecx ..." : "=r" (*out) : "r" (in));
> > asm volatile("" : : : "cx");
> >
> > The problem is that GCC might decide to store "out" in ecx and, between the
> > two asm statements, "movl %eax,(%ecx)". Which, of course, won't work.
> >
>

Yup, no bout a doubt it, you're right :))

I built an (home made) updated pgcc yesterday and fed it the kernel
at O6 to test. Gueeeess where it croaked.. checksum.c!

What was that quote about lying to your compiler again? <g>

-Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu