"Phil Endecott" <spam_from_gcc_help@chezphil.org> writes:
I know that in some circumstances gcc will generate read-modify-write
sequences to access memory locations, for example if I have a bitfield
struct. Is there a way in which I can tell it to only do (32-bit)
word writes to a region of memory, and to do read-modify-write
sequences instead of byte writes, even though the processor does have
byte write instructions?
Sure, this is what the volatile qualifier is for. If you always
access the memory through volatile qualified pointers, the compiler
will always access the memory precisely as you write in the program.