------- Additional Comments From amacleod at redhat dot com 2004-10-08 14:35 ------- So after a discussion, I dont think the patch will be applied.
A follow on sentence in the documentation reads: "Note that even a volatile asm instruction can be moved in ways that appear insignificant to the compiler, such as across jump instructions. You can't expect a sequence of volatile asm instructions to remain perfectly consecutive. If you want consecutive output, use a single asm. Also, GCC will perform some optimizations across a volatile asm instruction; GCC does not ``forget everything'' when it encounters a volatile asm instruction the way some other compilers do." Thats what it is doing in this case, we are moving unrelated instructions across the volatile asm. RTH suggested that we remove the sentence "In addition, GCC will not reschedule instructions across a volatile asm instruction." from the documention since it is incorrect given the above note. It you need instructions not to be moved across a volatile, they must be exposed in the asm. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17884