AVR C Runtime Library - Bugs: bug #37778, _MemoryBarrier() in cpufunc.h...
You are not allowed to post comments on this tracker with your current authentication level.
bug #37778: _MemoryBarrier() in cpufunc.h error on compile
| Submitter: | None | ||
| Submitted: | Mon 19 Nov 2012 09:52:10 PM UTC | ||
| Category: | Header | Severity: | 3 - Normal |
| Priority: | 9 - Immediate | Item Group: | libc code |
| Status: | In Progress | Percent Complete: | 50% |
| Assigned to: | dmix | Originator Email: | -email is unavailable- |
| Open/Closed: | Open | Release: | 1.8.0 |
| Fixed Release: | None | ||
|
Sun 27 Jan 2013 05:28:17 PM UTC, comment #3: |
Georg-Johann Lay <gjlayde> |
|
Sun 27 Jan 2013 12:58:16 PM UTC, comment #2: What is the necessity to add memory barrier for _NOP()?
|
Dmitry Xmelkov <dmix> |
|
Mon 19 Nov 2012 10:59:22 PM UTC, comment #1: ...and while your are fixing avr/cpufunc.h, don't forget to fix _NOP which reads:
|
Georg-Johann Lay <gjlayde> |
|
Mon 19 Nov 2012 09:52:10 PM UTC, original submission:
The _MemoryBarrier() macro defined in avr/cpufunc.h results in the following error when compiling:
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
Follow 5 latest changes.
| Date | Changed by | Updated Field | Previous Value | => | Replaced by |
|---|---|---|---|---|---|
| 2014-03-14 | soundararajan | Attached File | - | Added pr37778.patch, #30890 | |
| 2013-01-27 | dmix | Status | None | In Progress | |
| Percent Complete | 0% | 50% | |||
| Assigned to | None | dmix | |||
| 2012-11-20 | arcanum | Priority | 5 - Normal | 9 - Immediate |

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