Patchwork ping: Add static size report when using -fstack-usage for ARM targets

login
register
mail settings
Submitter Thomas Klein
Date Dec. 13, 2010, 7:43 p.m.
Message ID <4D06775B.1080504@web.de>
Download mbox | patch
Permalink /patch/75395/
State New
Headers show

Comments

Ralf Wildenhues - Dec. 13, 2010, 6:48 p.m.
Hello Thomas,

* Thomas Klein wrote on Mon, Dec 13, 2010 at 08:43:23PM CET:
> Hello Ramana
> 
> In assumption you are the reviewer with write permission, please
> commit or reject the patch.
> Original message <http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02627.html>.

You can find out who can review a patch by looking at the MAINTAINERS
file in the toplevel source directory; it lists three 'arm port'
maintainers who can review this, apart from global reviewers.

Cheers,
Ralf
Thomas Klein - Dec. 13, 2010, 7:43 p.m.
Hello Ramana

In assumption you are the reviewer with write permission, please commit 
or reject the patch.
Original message <http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02627.html>.

regards
  Thomas


2010-12-13  Thomas Klein <th.r.klein@web.de>

     * config/arm/arm.c (arm_expand_prologue): Report the static stack size
     if -fstack-usage is used.
     * config/arm/arm.c (thumb1_expand_prologue): Report the static 
stack size
     if -fstack-usage is used.

Patch

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c        (revision 167759)
+++ gcc/config/arm/arm.c        (working copy)
@@ -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)