This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/56219] avr-gcc-4.7.2 missing __uint24 loop optimisation


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56219

--- Comment #1 from demiurg_spb at freemail dot ru 2013-02-06 12:34:53 UTC ---
It would be optimal move outside loop all extra instructions, and use temp
register r0 more active.

    ldi r24,0
    ldi r25,lo8(4)                     // outside loop
.L2:
    mov r30,r24
    andi r30,lo8(7)
    mul r30,r25
    movw r30,r0
    subi r30,lo8(-(br.1322))
    sbci r31,hi8(-(br.1322))
    lpm r0,Z                           // use r0 as temp
    sts 100,r0
    subi r24,lo8(-(1))
    rjmp .L2
    clr __zero_reg__                   // outside loop


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