This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING^2][AVR] Add 'OS_main' attribute. (Need middle-end approval.)
- From: "Anatoly Sokolov" <aesok at post dot ru>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: "Anatoliy Sokolov" <aesok at post dot ru>, <ian at airs dot com>, <dnovillo at google dot com>
- Date: Wed, 7 May 2008 15:03:27 +0400
- Subject: Re: [PING^2][AVR] Add 'OS_main' attribute. (Need middle-end approval.)
- References: <1267744823.20080403195742@post.ru>
Hello.
Anatoly Sokolov wrote:
> This patch adds an 'OS_main' attribute to the AVR port. The 'main' functions
> with 'OS_main' attribute do not save any "call-saved" registers, requiring
> less stack space.
>
This patch add the 'prologue_contains' function in 'function.c' file. This
function is similar to 'prologue_epilogue_contains' function, but returns
true if the insn is part of prologue. Please, consider this changes for
approval.
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00283.html
> 2008-04-03 Anatoly Sokolov <aesok@post.ru>
>
> * rtl.h (prologue_contains): New declaration.
> * function.c (prologue_contains): New function.
> * config/avr/avr.h (machine_function): Add 'is_OS_main' field.
> * config/avr/avr.c (avr_OS_main_function_p): Add new function.
> (avr_attribute_table): Add 'OS_main' function attribute.
> (avr_regs_to_save, expand_prologue, expand_epilogue, output_movhi):
> Handle functions with 'OS_main' attribute.
Anatoly