avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-libc-dev] weird branch code in gcc-4.5.1?


From: Weddington, Eric
Subject: RE: [avr-libc-dev] weird branch code in gcc-4.5.1?
Date: Mon, 25 Oct 2010 11:11:49 -0600

I haven't seen anything like this yet, and I agree that it's weird.

Could you also try this test case on 4.4.3? The new IRA (Integrated Register 
Allocator) was introduced in the 4.4 series and I'd like to know if this issue 
shows up in that version too.

I would suggest that you fill out a "missed-optimization" bug in GCC, set the 
"target" field to "avr", and put me in the CC list.

Thanks,
Eric Weddington 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
org] On Behalf Of Rolf Ebert
> Sent: Saturday, October 23, 2010 6:24 PM
> To: address@hidden
> Subject: [avr-libc-dev] weird branch code in gcc-4.5.1?
> 
> I am wondering if I'm doing something totally wrong or if there is an 
> issue with gcc-4.5.1 (yes, Eric, you have warned me)
> 
> disassembling the typical putc() from the final elf files shows:
> 
>   11a:        90 91 c0 00     lds     r25, 0x00C0
>   11e:        95 ff           sbrs    r25, 5
>   120:        03 c0           rjmp    .+6     ; <-- weird?
>   122:        80 93 c6 00     sts     0x00C6, r24
>   126:        08 95           ret
>   128:        ff cf           rjmp    .-2     ; <-- weird?
> 
> 
> The corresponding code from gcc-4.3.3 was inlined and looks like:
> 
>    d0:        80 91 c0 00     lds     r24, 0x00C0
>    d4:        85 ff           sbrs    r24, 5
>    d6:        fc cf           rjmp    .-8
>    d8:        90 93 c6 00     sts     0x00C6, r25
> 
> 
> The corresponding source code is in Ada:
>        while UCSRA_Bits (UDRE_Bit) = False loop null; end loop;
>        UDR := Data;
> 
> I did not yet test a corresponding C code. I just want to ask if 
> somebody had seen an issue like that before.
> 
>     Rolf
> 
> 
> 
> _______________________________________________
> AVR-libc-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]