From patchwork Tue Jul 31 11:42:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 174255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 49DCD2C0089 for ; Tue, 31 Jul 2012 22:47:53 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1344343674; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Subject:Date:Message-ID:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=yoJZBOhGeBfWN4vlzFXf y1mnlYg=; b=tsfQ1+qJV2i+D3zCdetapvrA7HCzPl3zbMEC3eHiDA9qUhFoMBff YFrvV28tW5nIt3esH/FLTfqd317eyH4+SAMwFBdqHEGJKIND+pBictYG7V/Rh7Nk OkwoEWwI+gauO5D/HM+jIH7Y1hVP8yD04Rr3q0N1+LIgOBq0yiWTKvY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=aueQI2+pX1Efn/uRBTP+YhXe7KaxzDKf8zdSdTx+xYtpOqBS4tm3R61L089AdU 1N2Po8Gl6BmmReXoDM8lr0XumblXJVfxDctpsnF8I8ULOvy5HtjTvHYx+Zgklh+f qzIsWE8V8nMgCdV2xfFtTgFtiAqffgfEXdyf2JMoo8xqo=; Received: (qmail 17723 invoked by alias); 31 Jul 2012 12:47:44 -0000 Received: (qmail 17712 invoked by uid 22791); 31 Jul 2012 12:47:43 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Jul 2012 12:47:28 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6VClSuj003154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 31 Jul 2012 08:47:28 -0400 Received: from Cadeux.redhat.com (vpn1-6-48.ams2.redhat.com [10.36.6.48]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q6VClP6X010346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 31 Jul 2012 08:47:27 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: Commit: XStormy16: Add support for -fstack-usage Date: Tue, 31 Jul 2012 12:42:02 +0100 Message-ID: <87ipd4uph1.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi Guys, I am checking in the patch below to add support for reporting stack usage by the XStormy16 backend. Cheers Nick gcc/ChangeLog Index: gcc/ChangeLog 2012-07-31 Nick Clifton * config/stormy16/stormy16.c (xstormy16_expand_prologue): Add support for reporting stack usage. testsuite/ChangeLog 2012-07-31 Nick Clifton * gcc.dg/stack-usage-1.c (SIZE): Define for FRV, and for XStormy16. Index: gcc/config/stormy16/stormy16.c =================================================================== --- gcc/config/stormy16/stormy16.c (revision 190007) +++ gcc/config/stormy16/stormy16.c (working copy) @@ -1035,6 +1035,9 @@ if (layout.locals_size >= 32768) error ("local variable memory requirements exceed capacity"); + if (flag_stack_usage_info) + current_function_static_stack_size = layout.frame_size; + /* Save the argument registers if necessary. */ if (layout.stdarg_save_size) for (regno = FIRST_ARGUMENT_REGISTER; Index: gcc/testsuite/gcc.dg/stack-usage-1.c =================================================================== --- gcc/testsuite/gcc.dg/stack-usage-1.c (revision 190007) +++ gcc/testsuite/gcc.dg/stack-usage-1.c (working copy) @@ -64,6 +64,8 @@ # define SIZE 252 #elif defined (__frv__) # define SIZE 248 +#elif defined (xstormy16) +# define SIZE 254 #else # define SIZE 256 #endif