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] |
>>same model, an m68k routine could look like: >> >>/* pokeb(char *base_addr, int offset, char data) */ >> .global pokeb >>pokeb: >> move.l 4(%sp),%a0 /* get base_addr */ >> add.l 8(%sp),%a0 /* add offset */ >> move.b 15(%sp),(%a0) /* move data byte */ >> rts >> >>Art > >only if sizeof(int) == sizeof(long), >if sizeof(int) == sizeof(short), then >it would be > > move.l 4(%sp),%a0 > add.w 8(%sp),%a0 > move.b 11(%sp),(%a0) > rts True. We always run m68k GCC with the default mode of long ints. But porting from 80x86 might want short ints. Another good reason to stick with C. Art