This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On the AVR, some IO registers need a specific write order since the CPU core maintains a `temp' register to guarantee a atomic write operation to the entire 16-bit register using two 8-bit operations. When using the memory-mapped IO space (which is now often the default in AVR-gcc), this currently doesn't work for accessing 16-bit IO registers that have been passed as an `uint16_t *' pointer down to a function. While only a few registers actually need this procedure, discussion in the avr-gcc mailing list has yielded that it's probably a good idea to generally maintain the write order `high byte first, low byte second', since for all other 16-bit write operations, it simply doesn't matter. The suggested patch fixes this problem (at least for the situation that some developer was reporting). -- J"org Wunsch Unix support engineer joerg_wunsch@interface-systems.de http://www.interface-systems.de/~j/
Attachment:
patch-16bitassign
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |