]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm.c (arm_expand_prologue): Set the stack usage to 0 for naked functions.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 20 May 2016 20:51:18 +0000 (20:51 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 20 May 2016 20:51:18 +0000 (20:51 +0000)
* config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0
for naked functions.
(thumb1_expand_prologue): Likewise.

From-SVN: r236542

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

index 739e638374aa178726df5285eaad9bed6e2d743e..fe3d796eefd29ec3ec3adf0eaf99918242246954 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  Uros Bizjak  <ubizjak@gmail.com>
 
        * sched-deps.c (sched_analyze_2) <case TRAP_IF>: Also
index 3844275d39301154b6215e6152d1c3f6328abe7b..7fc7f0464ea06cf035f0a654dee468bf846f283c 100644 (file)
@@ -20685,7 +20685,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;
@@ -26709,7 +26713,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))
     {