This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20288] AVR assignment of a value through a 16 bit pointer generates out of order code
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2005 23:07:26 -0000
- Subject: [Bug target/20288] AVR assignment of a value through a 16 bit pointer generates out of order code
- References: <20050302181643.20288.bob.paddock@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-03-02 23:07 -------
(In reply to comment #0)
> [The follow emphasis is Atmel's from the data-sheet]:
>
> "On the AVR to do a 16-bit write, *THE HIGH BYTE MUST BE WRITTEN BEFORE THE LOW
> BYTE*. For a 16-bit read, THE LOW BYTE MUST BE READ BEFORE THE HIGH BYTE."
>
> This applies to all internal 16 bit I/O registers.
Personally see no problem. The quote above has specifically to do with how to write a
logical 16-bit timer/counter value into a pair of otherwise distinct 8-bit registers, which
controls a specific peripheral function which presumes a specific write sequence to maintain
the logical integrety of that specific timer/counter value; it has nothing to with 16-bit pointers,
the sequencing of multi-byte logical data type transactions, or the compiler in general.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20288