I replaced the '&' operator with the more appropriate '&&' one.... works
much better... 5 instructions instead of 115 (3 + 6*18 + 4) for the
previous code.
So that's indeed about 20 times faster. Although I still don't get why
it can't just use one single SBRC/S instruction instead of these 4 cp or
cpc instructions... I guess I am still missing something in the bit test
department...
if (address && 0x00040000)
24ec: 21 15 cp r18, r1
24ee: 31 05 cpc r19, r1
24f0: 41 05 cpc r20, r1
24f2: 51 05 cpc r21, r1
24f4: 11 f0 breq .+4 ; 0x24fa
Hmmm, '&&' might give much tighter code than '&', but my program no
longer works ! So it's still not the proper way to test a bit then,
dear... :o(((
--
Vince
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list