|
From: | Alex Crawford |
Subject: | [avr-libc-dev] [patch #7909] Adding __volatile__ to __asm__ within pgmspace header |
Date: | Mon, 31 Dec 2012 05:54:19 +0000 |
User-agent: | Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) |
URL: <http://savannah.nongnu.org/patch/?7909> Summary: Adding __volatile__ to __asm__ within pgmspace header Project: AVR C Runtime Library Submitted by: crawford Submitted on: Mon 31 Dec 2012 05:54:17 AM GMT Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: 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 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 31 Dec 2012 05:54:17 AM GMT Name: volatile.patch Size: 13kB By: crawford Patch for avr/pgmspace.h <http://savannah.nongnu.org/patch/download.php?file_id=27168> _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/patch/?7909> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |