arm.c (arm_expand_prologue): Set the stack usage to 0 for naked functions.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 20 May 2016 20:49:33 +0000 (20:49 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 20 May 2016 20:49:33 +0000 (20:49 +0000)
* config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0
for naked functions.
(thumb1_expand_prologue): Likewise.

From-SVN: r236539

gcc/ChangeLog
gcc/config/arm/arm.c

index 3f65d05f699ec5c50123fca7a0d18b0b4c347461..8d6d3c4b0f434ff687a34f4c39ea0355a28754b1 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-20  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.
+
 2016-05-20  Nathan Sidwell  <nathan@acm.org>
 
        * config/nvptx/nptx.c (nvptx_option_override): Only set
index 12060ba569f99e4447ec5705fdeee7cd081ab6f1..af9725b93d4825d59c39e52019983fd784b5180f 100644 (file)
@@ -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))
     {