From patchwork Wed Sep 18 08:04:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 275617 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8844A2C00C8 for ; Wed, 18 Sep 2013 18:05:28 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=MFgc2WSJ1c5Z/SzVDnl8s2Us53OboevzxREnOpAVO+q8DHDdQv7eo OnmIszSB/+MJpqOUz0/LfUQAdR4KsP2mWgfT/h1OieptvGhnJk+arnRE503rZC13 cKkwM8ERCzCKQKFmNd1vbvhP18vyGge7Uv8r4n6W2fGS3Ge+g0FQPY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=q1Jr6wi0OxraVtwc5I32bNGOiIk=; b=Dg/LXWFiMUw5oG6la88j rpof6cGEjpG0momRVXoI49vxx/VpgLttZ5LX1VHyl66gVVz1ogHW7wDrWHJsWIoJ u0qCIhq9GCcb52eRS1FczmrEk0uarWKaEFLXUopI+mMkjpundSvWz8hfJnxpzBy8 V6k65QxrDYzWig9KyhDTp3I= Received: (qmail 18500 invoked by alias); 18 Sep 2013 08:05:23 -0000 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 Received: (qmail 18490 invoked by uid 89); 18 Sep 2013 08:05:22 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2013 08:05:22 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, MEDICAL_SUBJECT, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com 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 r8I85KSc006892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 18 Sep 2013 04:05:21 -0400 Received: from Cadeux.redhat.com (vpn1-5-196.ams2.redhat.com [10.36.5.196]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8I85ImO012542 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 18 Sep 2013 04:05:20 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: Commit: MSP430: Pass -md on to assembler Date: Wed, 18 Sep 2013 09:04:36 +0100 Message-ID: <87bo3q3697.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi Guys, I am applying the patch below to add a couple of minor tweaks to the msp430.h header file. The first is to pass the -md command line option to the assembler, to enable the copying of data from ROM to RAM. (This is a code size optimization. The assembler and linker conspire to detect when the .data section is empty and, if it is, the code to perform the copying is omitted from crt0.o. The -md command line option enables this feature). The other tweak is to define ASM_DECLARE_FUNCTION_NAME so that msp430_start_function can provide some annotations describing the function in the assembler output. This is mainly for debugging purposes. Cheers Nick gcc/ChangeLog 2013-09-18 Nick Clifton * config/msp430/msp430.h (ASM_SPEC): Pass -md on to the assembler. (ASM_DECLARE_FUNCTION_NAME): Define. Index: gcc/config/msp430/msp430.h =================================================================== --- gcc/config/msp430/msp430.h (revision 202680) +++ gcc/config/msp430/msp430.h (working copy) @@ -54,6 +54,7 @@ "%{mmcu=msp430x:-mmcu=msp430X;mmcu=*:-mmcu=%*} " /* Pass the MCU type on to the assembler. */ \ "%{mrelax=-mQ} " /* Pass the relax option on to the assembler. */ \ "%{mlarge:-ml} " /* Tell the assembler if we are building for the LARGE pointer model. */ \ + "%{!msim:-md} %{msim:%{mlarge:-md}}" /* Copy data from ROM to RAM if necessary. */ \ "%{ffunction-sections:-gdwarf-sections}" /* If function sections are being created then create DWARF line number sections as well. */ /* Enable linker section garbage collection by default, unless we @@ -399,3 +400,7 @@ ) #define ACCUMULATE_OUTGOING_ARGS 1 + +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + msp430_start_function ((FILE), (NAME), (DECL))