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

 
 

bug #28881: nop() macro for NOP instruction

Submitted by:  Soren Jorvang <soren>
Submitted on:  Fri 12 Feb 2010 08:14:55 PM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: FixedPercent Complete: 90%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: 1.6.7Fixed Release: 1.6.2

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
Wed 07 Apr 2010 04:19:53 AM UTC, comment #2:

Changing this to "Feature Request".

Eric Weddington <arcanum>
Project 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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by arcanum (Posted a comment)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by soren (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Jun 2010 02:09:23 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.6.2
    Wed 07 Apr 2010 04:19:53 AM UTCarcanumCategoryLibrary=>Feature Request
    Fri 12 Feb 2010 08:14:55 PM UTCsorenAttached File-=>Added delay_basic.h.diff, #19690

    Back to the top


    Powered by Savane 3.1-cleanup1