From 023a7c5dd374cdf0d99e341ea9a13efc5c7f51aa Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 20 May 2016 20:49:33 +0000 Subject: [PATCH] * config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0 for naked functions. (thumb1_expand_prologue): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236539 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f65d05f699..8d6d3c4b0f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-20 Eric Botcazou + + * config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0 + for naked functions. + (thumb1_expand_prologue): Likewise. + 2016-05-20 Nathan Sidwell * config/nvptx/nptx.c (nvptx_option_override): Only set diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 12060ba569f..af9725b93d4 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -21466,7 +21466,11 @@ arm_expand_prologue (void) /* Naked functions don't have prologues. */ if (IS_NAKED (func_type)) - return; + { + if (flag_stack_usage_info) + current_function_static_stack_size = 0; + return; + } /* Make a copy of c_f_p_a_s as we may need to modify it locally. */ args_to_push = crtl->args.pretend_args_size; @@ -24698,7 +24702,11 @@ thumb1_expand_prologue (void) /* Naked functions don't have prologues. */ if (IS_NAKED (func_type)) - return; + { + if (flag_stack_usage_info) + current_function_static_stack_size = 0; + return; + } if (IS_INTERRUPT (func_type)) { -- 2.11.4.GIT