Re: [patch] 2.6.4 remove intermittent warnings from spinlock code

From: Matthew Wilcox <>
Date: 2004-03-17 01:54:02
On Mon, Mar 15, 2004 at 11:34:43PM -0800, David Mosberger wrote:
> Hmmh, in my opinion GCC should put a stop-bit when using a register
> after an "asm" that marks that register as "clobbered".  For now, I
> put an explicit stop-bit after the McKinley spinlock versions (the
> Merced ones should be OK because they already have a stop-bit after
> writing p14).  We should still sort out why GCC doesn't get this
> right.

I'm not a compiler person, but ...

Seems to me that doing exactly what you're asking for is hard.  Editing
the inline asm to use a stop-bit if the compiler needs to reuse that
register would be a really awful layering violation.  But it shouldn't
be too hard for p14 to be considered unavailable until the next stop
bit has been issued.

Al, want to raise this on the gcc mailing list?

"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Mar 16 10:30:36 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:24 EST