This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ARM] Fix bogus -fstack-usage warning on naked functions
- From: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 May 2016 15:01:24 +0100
- Subject: Re: [ARM] Fix bogus -fstack-usage warning on naked functions
- Authentication-results: sourceware.org; auth=none
- References: <1484861 dot cdItfTZVga at polaris>
Hi Eric,
On 16/05/16 09:40, Eric Botcazou wrote:
Hi,
-fstack-usage issues the "not supported by this target" warning on naked
functions because the prologue routines do an early return for them.
Tested on arm-eabi, may I apply it on all active branches?
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0
for naked functions.
(thumb1_expand_prologue): Likewise.
Ok.
Considering the use of current_function_static_stack_size in output_stack_usage
this definitely looks sensible and safe.
Thanks,
Kyrill