From 55256000cf069f58f1e19df4786766a2da17bf3d Mon Sep 17 00:00:00 2001
From: Thomas Klein
Date: Tue, 14 Dec 2010 16:00:33 +0000
Subject: arm.c (arm_expand_prologue): Report the static stack size if
-fstack-usage is used.
* 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 | 6 ++++++
gcc/config/arm/arm.c | 8 ++++++++
2 files changed, 14 insertions(+)
(limited to 'gcc')
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9416805..dbf5683 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-14 Thomas Klein
+
+ * 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
PR debug/46885
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index cd47831..21fc256 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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)
--
cgit v1.1