Compiler Misoptimizations
"Basically, what the gcc developers are saying is that gcc is free to load and store to any memory location, so long as it behaves as if the instructions were executed in sequence,"Nick Piggin noted, describing a linked discussion on the GCC development mailing list. He explained his concerns,"for x86, obviously the example above shows it can be miscompiled, but it is probably relatively hard to make it happen for a non trivial sequence. For an ISA with lots of predicated instructions like ia64, it would seem to be much more likely. But of course we don't want even the possibility of failures. The gcc guys seem to be saying to mark everything volatile that could be touched in a critical section. This is insane for Linux."
|
|
Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.