[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] weird branch code in gcc-4.5.1?
From: |
Rolf Ebert |
Subject: |
[avr-libc-dev] weird branch code in gcc-4.5.1? |
Date: |
Sun, 24 Oct 2010 00:23:41 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 |
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] weird branch code in gcc-4.5.1?,
Rolf Ebert <=