Don't save registers in main().
authorGeorg-Johann Lay <avr@gjlay.de>
Tue, 9 Jan 2018 10:38:45 +0000 (10:38 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Tue, 9 Jan 2018 10:38:45 +0000 (10:38 +0000)
commitdcbe9170136139ea9cc3a85699efebb2b7be0fa2
treed471828ec0182d4421c163a4daf84820272c2f50
parentb25f84d0ff01aa4014428402029c46cda4c4a2a0
Don't save registers in main().

gcc/
Don't save registers in main().
PR target/83737
* doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
* config/avr/avr.opt (-mmain-is-OS_task): New target option.
* config/avr/avr.c (avr_set_current_function): Don't error if
naked, OS_task or OS_main are specified at the same time.
(avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
OS_main.
(avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
attribute.
* common/config/avr/avr-common.c (avr_option_optimization_table):
Switch on -mmain-is-OS_task for optimizing compilations.

From-SVN: r256373
gcc/ChangeLog
gcc/common/config/avr/avr-common.c
gcc/config/avr/avr.c
gcc/config/avr/avr.opt
gcc/doc/invoke.texi