This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

byte access in MC68k


Hi again,

I want to thank Doug Evans for his instant answer to my previous
question. I have another one:

Is there a switch for gcc (68k) to force it not to use byte (char)
operations?
(I couldn't find something like this)

All the variables I use are at least short. Nevertheless the compiler
detects that from some variables just the lower byte is used:

	if((ist & SW_SRI) != SW_SRI){...}

In the ready code 

	move.b -11(%a6),%d0
	and.b #128,%d0
	tst.b %d0

odd memory addresses are accessed which causes really big trouble for my
system. In the given case the preprocessor reduces

        #define SW_SRI 0x00f0

to just 0xf0. A precompilier switch to prevent that whould also be
possible. 

Thanks in advance

Jens