bugAVR C Runtime Library - Bugs: bug #28881, nop() macro for NOP instruction

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28881: nop() macro for NOP instruction

Submitter:  Soren Jorvang <soren>
Submitted:  Fri 12 Feb 2010 08:14:55 PM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  joerg_wunsch
Percent Complete:  90% Open/Closed:  Closed
Release:  1.6.7 Fixed Release:  1.6.2

Tue 08 Jun 2010 02:09:23 PM UTC, comment #3: 

I just implemented a new header file, <avr/cpufunc.h>.
It contains the macros _NOP() and _MemoryBarrier().

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 07 Apr 2010 04:19:53 AM UTC, comment #2: 

Changing this to "Feature Request".

Eric Weddington <arcanum>
Group administrator
Sat 13 Feb 2010 12:34:39 AM UTC, comment #1: 

You guessed it: there's no real place for the nop() macro
to go into.  That's the main reason it's not yet there.

I disagree about the BREAK instruction though: its only
purpose it to implement soft breakpoints, so it really
only makes sense when implementing a debugger.

Joerg Wunsch <joerg_wunsch>
Group administrator
Fri 12 Feb 2010 08:14:55 PM UTC, original submission:  

The special instructions CLI/SEI/SLEEP/WDR each have a convenient macro to allow their direct use in C.

This patch adds NOP to that list as it can be useful as e.g. a write/read barrier without any side effects.

util/delay_basic.h as used in the patch may not be the ideal place for it, but I couldn't find a better, more central place for it in include/avr.

The BREAK instruction added to newer AVR's should probably also have such a convenience macro added. Again, I am not sure where I think the best place for it would be or if it should be called something other than just break() to avoid any confusion with the break keyword.

Soren Jorvang <soren>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19690:  delay_basic.h.diff added by soren (586B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by soren (Submitted the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-08 joerg_wunsch StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.6.2
    2010-04-07 arcanum CategoryLibrary Feature Request
    2010-02-12 soren Attached File- Added delay_basic.h.diff, #19690

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code