On Saturday 29 January 2005 11:41, Andy Hutchinson wrote:
Many Thanks to summarize 3.4.3 has same response as WINAVR 3.3.1
I've filed bug report on 4.0 for lack of loop reversal - but it will be
treated as missed optimisation unless other ports take a big hit.
gcc-avr has problem with pattern matching - This happens at least back
to 3.3.1
The AVR.MD RTL peephole turns sign status tests (Rx<=0) + jump into (RX
& -32768) +jump. Then "*sbrx_and_branchhi" turns this into SBRS.
Unfortunately this occurs before the potentially more efficient code
peephole ((Rx=Rx-1)<=0)+jump is tried.
Somehow I have to figure out how to catch things before 1st peephole
grabs the sign test. Probabley another RTL peephole and delete the old
code ones.
Interesting thing with avr-gcc 4.0 -- wrong size in comment.
Look:
...
testloop1:
/* prologue: frame size=0 */
push r28
push r29
/* prologue end (size=2) */
ldi r28,lo8(10)
ldi r29,hi8(10)
.L2:
call foo
sbiw r28,1
brne .L2
/* epilogue: frame size=0 */
pop r29
pop r28
ret
/* epilogue end (size=3) */
/* function testloop1 size 12 (7) */
Similar error is in 3.3.4 also.
I have send a message to gcc bug-list (#19684).
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list