[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [bug #37778] _MemoryBarrier() in cpufunc.h error on c

From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] [bug #37778] _MemoryBarrier() in cpufunc.h error on compile
Date: Sun, 27 Jan 2013 18:22:50 +0100
User-agent: Thunderbird (Windows/20100228)

Dmitry Xmelkov a écrit:
Follow-up Comment #2:

What is the necessity to add memory barrier for _NOP()?
Common usage, like:
    PORTB |= 1;
    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:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]