[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: |
Weddington, Eric |
Subject: |
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked." |
Date: |
Fri, 27 Jan 2012 18:28:47 -0700 |
> -----Original Message-----
> From: address@hidden
[mailto:avr-
> address@hidden On Behalf Of
Bill
> Westfield
> Sent: Friday, January 27, 2012 4:28 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Weird optimization issue with avr-gcc
4.5.3,re
> "naked."
>
>
> Though I'm not sure I understand why the original complaint was
considered a
> bug. They appear to have been counting on a naked C function to fall
in at the
> top and fall out at the bottom, which seems like even more of an abuse
of
> "naked" than I was using (though I guess allowing that behavior is
useful,
> especially in init code.)
Well, ideally, it should just be a non-main function that is set up as
"naked" and placed in a .initN section. That means it doesn't have a
function prologue and epilogue, i.e. it's not called from anywhere and
doesn't return anywhere; it just runs "in line", which is what you need
to put C code in a .initN section.
The main function should still be set up as a "OS_main" function, i.e.
it doesn't return anywhere.
Subtle differences. But I thought that all this was described in the
avr-libc user manual (and/or GCC manual). If not, then maybe we need to
add something to the avr-libc FAQ.
Eric
- Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", (continued)
- 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
Message not availableRe: [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.",
Weddington, Eric <=
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Georg-Johann Lay, 2012/01/30
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Weddington, Eric, 2012/01/30
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Johannes Bauer, 2012/01/27
Re: [avr-gcc-list] Weird optimization issue with avr-gcc 4.5.3, re "naked.", Joerg Wunsch, 2012/01/27