This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: MN10300: Add support for -fstack-usage
- From: Nick Clifton <nickc at redhat dot com>
- To: law at redhat dot com, aoliva at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 06 Aug 2012 10:48:47 +0100
- Subject: RFA: MN10300: Add support for -fstack-usage
Hi Jeff, Hi Alex,
Please may I apply the small patch below to add support for reporting
stack usage to the MN10300 port ?
Cheers
Nick
gcc/ChangeLog
2012-08-06 Nick Clifton <nickc@redhat.com>
* config/mn10300/mn10300.c (mn10300_expand_prologue): Report
stack usage if requested.
Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c (revision 190157)
+++ gcc/config/mn10300/mn10300.c (working copy)
@@ -744,6 +744,9 @@
{
HOST_WIDE_INT size = mn10300_frame_size ();
+ if (flag_stack_usage_info)
+ current_function_static_stack_size = size;
+
/* If we use any of the callee-saved registers, save them now. */
mn10300_gen_multiple_store (mn10300_get_live_callee_saved_regs (NULL));