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

--- Comment #5 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-11-03 
11:01:55 UTC ---
(In reply to comment #0)

> foo:
>     ldi r24,lo8(-86)
>     ldi r30,lo8(2752)
>     ldi r31,hi8(2752)
>     std Z+3,r24
> .L2:
>     lds r24,2754
>     sbrs r24,7
>     rjmp .L2
>     ldi r24,lo8(-69)
>     ldi r30,lo8(2752)
>     ldi r31,hi8(2752)
>     std Z+3,r24
>     [...]

This is the code generated with Paolo's patch applied:

foo:
    ldi r24,lo8(-86)
    sts 2755,r24
.L2:
    lds r24,2754
    sbrs r24,7
    rjmp .L2
    ldi r24,lo8(-69)
    sts 2755,r24
    [...]

Reply via email to