Force 32 bit access to device

viswanath krishnamurthy viswak@yahoo.com
Thu Oct 27 18:19:00 GMT 2005


I have a retarded piece of hardware which only allows
32 bit access. If I use bit-fields, GCC optimizes to
uses byte/short depending on bit field size. Is there
an option to force GCC to generate 32 bit
read-modify-write for bit-fields?

e.g
struct str {
        volatile unsigned int a:8;
        volatile unsigned int b:24;
};

struct str s;

s.a = 5;

will generate a 8 bit access (store)

gcc 3.2.3
Target: MIPS/x86

-Viswa



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs



More information about the Gcc-help mailing list