[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping
From: |
Anatoly Sokolov |
Subject: |
[avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it |
Date: |
Tue, 13 Feb 2007 22:28:19 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
Follow-up Comment #2, bug #19050 (project avr-libc):
In oficial GCC 4.x main() do not converted to a normal function. 'atmega256'
patch does it.
For fast correction of a bug it is necessary to restore special handling of
main() funcion in 'patch-zz-atmega256x' patch.
These changes should be reverted:
- if (main_p)
- {
- fprintf (file, ("\t"
- AS1 (ldi,r28) ",lo8(%s - " HOST_WIDE_INT_PRINT_DEC ")"
CR_TAB
- AS1 (ldi,r29) ",hi8(%s - " HOST_WIDE_INT_PRINT_DEC ")"
CR_TAB
- AS2 (out,__SP_H__,r29) CR_TAB
- AS2 (out,__SP_L__,r28) "\n"),
- avr_init_stack, size, avr_init_stack, size);
-
- prologue_size += 4;
- }
- else if (minimize && (frame_pointer_needed || live_seq > 6))
+ if (minimize && (frame_pointer_needed || live_seq > 6))
and:
- if (main_p)
- {
- /* Return value from main() is already in the correct registers
- (r25:r24) as the exit() argument. */
- if (AVR_MEGA)
- {
- fputs ("\t" AS1 (jmp,exit) "\n", file);
- epilogue_size += 2;
- }
- else
- {
- fputs ("\t" AS1 (rjmp,exit) "\n", file);
- ++epilogue_size;
- }
- }
- else if (minimize && (frame_pointer_needed || live_seq > 4))
+ if (minimize && (frame_pointer_needed || live_seq > 4))
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?19050>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, (continued)
- 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
- 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, Marek Michalkiewicz, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, David Brown, 2007/02/14
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call mainratherthanjumping to it, Eric Weddington, 2007/02/14
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it,
Anatoly Sokolov <=
- [avr-libc-dev] Re: [bug #19050] gcrt1.S should call main rather than jumping to it, Joerg Wunsch, 2007/02/13
- Re: [avr-libc-dev] Re: [bug #19050] gcrt1.S should call main ratherthan jumping to it, Anatoly Sokolov, 2007/02/13
- RE: [avr-libc-dev] Re: [bug #19050] gcrt1.S should call mainratherthan jumping to it, Eric Weddington, 2007/02/14
- Re: [avr-libc-dev] Re: [bug #19050] gcrt1.S should call mainratherthan jumping to it, Anatoly Sokolov, 2007/02/15
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/16
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/16
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/16
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/17
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/17