Can I force a word read-modify-write instread of a byte write?

Phil Endecott spam_from_gcc_help@chezphil.org
Mon Jul 2 17:25:00 GMT 2007


Ian Lance Taylor wrote:
> Oh, I see, you want the compiler to figure stuff out for you.

Yes please :-)

> Unfortunately, that won't work.  You need to write the 32-bit
> read/modify/write instructions yourself.

Yes, that was '(b)' in my question I think.  I'm just looking for a 
lazy way to avoid work.

> There is nothing in gcc which will force it to use 32-bit memory
> accesses if you don't explicitly write 32-bit memory accesses.

My recollection is that if the processor doesn't have instructions for 
a particular width, gcc will synthesize the access.  I was just hoping 
that there was some 'magic hack' that could activate that functionality.


Cheers,

Phil.






More information about the Gcc-help mailing list