[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjump
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it |
Date: |
Tue, 13 Feb 2007 20:59:34 +0100 |
User-agent: |
Mutt/1.5.11 |
As Eric Weddington wrote:
> Joerg, what do you think of this? Time to revisit the atmega256x
> patch?
Well, maybe.
I suggest we change gcrt1.S anyway: if we are not going to place the
additional infinite loop behind itx, the only cost for doing so is a
single CALL/RCALL plus the two (or three for the ATmega256x) bytes on
the stack. As we already do have compilers around right now that
treat main() as a normal function, this would simply get us onto the
safe side avr-libc-wise.
In general, I agree with Anatoly's argumentation. However, I believe
the C standard would require main() to be callable, so ideally the
treatment of main() should be an option, and it should even default to
being enabled (like we do for -mint8, although the consequences aren't
so drastic as in the -mint8 case). In case we should ever implement
64-bit floats, I'd also like to see them being the default (for
standards conformance reasons), with some option (say, -mdouble32)
to revert to the current behaviour.
Btw., part of treating main() as a normal function was to remove the
obsolete initialization of the stack pointer at the beginning of
main()(when it's actually being already initialized early in .init2).
I don't know whether that's alredy default GCC behaviour, or also came
from Bjoern's ATmega256x patch.
Also, we should certainly ask Bjoern for any comments.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Joerg Wunsch, 2007/02/13
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Joerg Wunsch, 2007/02/13
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Anatoly Sokolov, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it,
Joerg Wunsch <=
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Anatoly Sokolov, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Björn Haase, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Joerg Wunsch, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Joerg Wunsch, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Bob Paddock, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Alexey Boyko, 2007/02/14
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Marek Michalkiewicz, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Björn Haase, 2007/02/13