[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "nake
From: |
Bill Westfield |
Subject: |
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked." |
Date: |
Fri, 27 Jan 2012 00:30:46 -0800 |
On Jan 26, 2012, at 2:10 PM, Georg-Johann Lay wrote:
> I tested the code with avr-gcc 4.5 and command line options -Os -mmcu=atmega8
>
> With the attributes, the object size is 54 bytes.
> Without the attributes the object size is 64 bytes.
With 4.5.3 ? Whatever this issue is, it apparently snuck in between
4.5.2 and 4.5.3.
(reports are that 4.5.2 produced smaller code than 4.3.2)
Sorry for forgetting the commandline/etc in my report. I am using
-Os, and compiling for m328p
(I added conditionals so I can control from command line) I get:
address@hidden avr-gcc -ggdb -Os -c -mmcu=atmega328p -mshort-calls foo.c
address@hidden avr-size foo.o
text data bss dec hex filename
64 0 0 64 40 foo.o
address@hidden avr-gcc -ggdb -Os -c -mmcu=atmega328p -mshort-calls
-DNAKED foo.c
address@hidden avr-size foo.o
text data bss dec hex filename
58 0 0 58 3a foo.o
and more substantial diffs, including the following. "naked" deletes
the prolog, but adds instructions in the body...
-.LM7:
+.LSM6:
ldi r24,lo8(5)
- rjmp .L8
+ rcall putch
+ rjmp .L4
.L3:
-.LM8:
+.LSM7:
cpi r24,lo8(-127)
brne .L5
-.LM9:
+.LSM8:
ldi r24,lo8(4)
- rjmp .L8
+ rcall putch
+ rjmp .L4
.L5:
-.LM10:
+.LSM9:
ldi r24,lo8(3)
>
- [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", William \"Chops\" Westfield, 2012/01/26
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Weddington, Eric, 2012/01/26
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Bill Westfield, 2012/01/27
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Jan Waclawek, 2012/01/27
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.",
Bill Westfield <=
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Bill Westfield, 2012/01/27
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Jan Waclawek, 2012/01/27
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Georg-Johann Lay, 2012/01/27
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", William \"Chops\" Westfield, 2012/01/28
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", William \"Chops\" Westfield, 2012/01/28
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Volker Kuhlmann, 2012/01/28
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Georg-Johann Lay, 2012/01/28
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Georg-Johann Lay, 2012/01/26