diff mbox

RFA: MN10300: Add support for -fstack-usage

Message ID 873940bbb4.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton Aug. 6, 2012, 9:48 a.m. UTC
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.

Comments

Jeff Law Aug. 6, 2012, 3:21 p.m. UTC | #1
On 08/06/2012 03:48 AM, Nick Clifton wrote:
> 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.
This is fine.  Thanks.

jeff
diff mbox

Patch

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