patchAVR C Runtime Library - Patches: patch #7909, Adding __volatile__ to __asm__...


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

patch #7909: Adding __volatile__ to __asm__ within pgmspace header

Submitted by:  Alex Crawford <crawford>
Submitted on:  Mon 31 Dec 2012 05:54:17 AM UTC  
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Joerg Wunsch <joerg_wunsch> Open/Closed:  Closed

Thu 02 May 2013 03:56:12 PM UTC, comment #2: 

Applied in SVN r2381.

I'll keep bug #38021 open anyway, but the patch at least
appears to be better than the existing implementation, so
I think it's useful as a short-term solution.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Fri 04 Jan 2013 01:15:30 PM UTC, comment #1: 
Georg-Johann Lay <gjlayde>
Mon 31 Dec 2012 05:54:17 AM UTC, original submission:  

I noticed that gcc was optimizing out calls to pgm_read_word_far() that were within a while loop. Adding the volatile directive fixes the underlying problem. I've added the directive to each of the LPM and ELPM calls (20 in all).

The patch was generated from avr-libc-1.8.0.


Alex Crawford <crawford>


Attached Files
file #27168:  volatile.patch added by crawford (13KiB - text/plain - Patch for avr/pgmspace.h)


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-02 joerg_wunsch StatusNone => Done
        Assigned toNone => joerg_wunsch
        Open/ClosedOpen => Closed
    2012-12-31 crawford Attached File- => Added volatile.patch, #27168

    Back to the top

    Powered by Savane 3.5