arm.c (arm_expand_prologue): Report the static stack size if -fstack-usage is used.
authorThomas Klein <th.r.klein@web.de>
Tue, 14 Dec 2010 16:00:33 +0000 (16:00 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 14 Dec 2010 16:00:33 +0000 (16:00 +0000)
* config/arm/arm.c (arm_expand_prologue): Report the static stack
size if -fstack-usage is used.
(thumb1_expand_prologue): Likewise.

From-SVN: r167805

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

index 9416805cc3da1bc1a773425f73caff5e4f0fd228..dbf56836809b772d986ef2b32a4484ee4be6d9d6 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-14  Thomas Klein  <th.r.klein@web.de>
+
+       * config/arm/arm.c (arm_expand_prologue): Report the static stack
+       size if -fstack-usage is used.
+       (thumb1_expand_prologue): Likewise.
+
 2010-12-14  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/46885
index cd4783174304846cd7069069ac7975bca507444d..21fc2565968875c7c53c6560a68c2eccbd9a448e 100644 (file)
@@ -15816,6 +15816,10 @@ arm_expand_prologue (void)
        }
     }
 
+  if (flag_stack_usage)
+    current_function_static_stack_size
+      = offsets->outgoing_args - offsets->saved_args;
+
   if (offsets->outgoing_args != offsets->saved_args + saved_regs)
     {
       /* This add can produce multiple insns for a large constant, so we
@@ -20628,6 +20632,10 @@ thumb1_expand_prologue (void)
     emit_move_insn (gen_rtx_REG (Pmode, ARM_HARD_FRAME_POINTER_REGNUM),
                    stack_pointer_rtx);
 
+  if (flag_stack_usage)
+    current_function_static_stack_size
+      = offsets->outgoing_args - offsets->saved_args;
+
   amount = offsets->outgoing_args - offsets->saved_regs;
   amount -= 4 * thumb1_extra_regs_pushed (offsets, true);
   if (amount)