Hi Eric, > On 04/04/12 12:24, Eric Botcazou wrote:
You probably need to adjust gcc.dg/stack-usage-1.c too. s/flag_stack_usage/flag_stack_usage_info/
Thanks for the corrections. Revised patch attached. OK for mainline/4.7 branch ? Cheers Nick gcc/ChangeLog 2012-04-04 Nick Clifton <ni...@redhat.com> * config/rl78/rl78.c (rl78_expand_prologue): Set stack use information, if requested. gcc/testsuite/ChangeLog 2012-04-04 Nick Clifton <ni...@redhat.com> * gcc.dg/stack-usage-1.c (SIZE): Define for the RL78.
Index: gcc/config/rl78/rl78.c =================================================================== --- gcc/config/rl78/rl78.c (revision 186130) +++ gcc/config/rl78/rl78.c (working copy) @@ -827,6 +827,9 @@ if (!cfun->machine->computed) rl78_compute_frame_info (); + if (flag_stack_usage_info) + current_function_static_stack_size = cfun->machine->framesize; + for (i = 0; i < 16; i++) if (cfun->machine->need_to_push [i]) { Index: gcc/testsuite/gcc.dg/stack-usage-1.c =================================================================== --- gcc/testsuite/gcc.dg/stack-usage-1.c (revision 186130) +++ gcc/testsuite/gcc.dg/stack-usage-1.c (working copy) @@ -58,6 +58,8 @@ # define SIZE 224 #elif defined (__epiphany__) # define SIZE (256 - __EPIPHANY_STACK_OFFSET__) +#elif defined (__RL78__) +# define SIZE 254 #else # define SIZE 256 #endif