This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^2][AVR] Add 'OS_main' attribute. (Need middle-end approval.)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]