This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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));
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]