Dmitry Xmelkov a écrit:
Follow-up Comment #2:
What is the necessity to add memory barrier for _NOP()?
Common usage, like:
PORTB |= 1;
_NOP();
PORTB &= ~1;
is safe, as hardware registers are volatile.
Question is whether or not NOP should be allowed to be moved across
ordinary memory moves.
For SEI and CLI, for example, I think this is not wanted in general.
NOP is less intrusive than SEI / CLI, of course, but avr-gcc emits
__builtin_avr_nop() with a memory clobber:
http://gcc.gnu.org/viewcvs/trunk/gcc/config/avr/avr.md?revision=195151&view=markup#l5938
_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev