On 08/08/2012 04:04 PM, Michael Schnell wrote:
With "volatile" the code is a lot worse, I don't understand this, as the "normal" code not only fulfills what is necessary to volatile ...
In fact the compiler might be right that "volatile" also includes reading and writing all bytes of a variable with any access (as the hardware might derive a trigger from same <e.g. when reading or writing a hardware FiFo> ). Thus in-memory bit instructions, that only access a single byte might be not appropriate for volatile int variables.
But nonetheless it's not a good idea of the compiler to avoid a memory->memory move instruction for volatiles.
-Michael _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev