Okay, I've stared at this issue for most of the day, and I have a fix
for the immediate issue.
However, I also am convinced that the whole scheme with the __xg() macro
is just broken. It was introduced in 1.3.11 when xchg and cmpxchg where
neither "asm volatile" nor had "memory" clobbers as an apparent way to
keep gcc from moving memory references around it, but since the array
type is "unsigned long" rather than a char type, it probably doesn't
even work right, and with asm volatile/memory clobber it should not be
At this point I'd like to push an urgent patch to fix the immediate
issue, and a cleanup patch getting rid of __xg() for .36.
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.