On Tuesday 07 February 2006 07:24, Joerg Wunsch wrote:
> [EMAIL PROTECTED] wrote:
> > I must have mixed up some of my testing results. Thanks to
> > lfmorrison from AVRfreaks.
>
> Here's the smallest reproducible test case:
>
> #define STRUCTSIZE 5
> struct a {
>         char z[STRUCTSIZE];
> };
>
> extern struct a *ap;
> extern struct a b;
>
> void
> bug(void)
> {
>         *ap++ = b;
> }

Avr-gcc 3.3.5 is correct:
        lds r24,ap
        lds r25,(ap)+1
        ldi r18,lo8(5)
        mov r31,r25
        mov r30,r24
        ldi r26,lo8(b)
        ldi r27,hi8(b)
        ld __tmp_reg__,X+
        st Z+,__tmp_reg__
        dec r18
        brne .-8
        adiw r24,5
        sts (ap)+1,r25
        sts ap,r24

Dmitry.



_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to