Cc: Nick Piggin <nickpiggin@...>, Satyam Sharma <ssatyam@...>, Linux Kernel Mailing List <linux-kernel@...>, David Howells <dhowells@...>, Andi Kleen <ak@...>, Andrew Morton <akpm@...>
Actually, I take that back. I think gcc does the right thing, and yes,
it's explained by the memory clobber being just a blind "write to memory"
rather than read memory. My bad.
It does leave us with very few ways of saying that an asm can *read*
memory, and so it might be good to have it clarified that "volatile"
implies that (at least with the memory clobber).
Your examples are good, I think.
Linus
-