From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99447 invoked by alias); 31 Jul 2015 15:54:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 99434 invoked by uid 89); 31 Jul 2015 15:54:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 31 Jul 2015 15:54:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 7187A28C591 for ; Fri, 31 Jul 2015 15:54:46 +0000 (UTC) Received: from littlehelper.redhat.com (vpn1-4-114.ams2.redhat.com [10.36.4.114]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6VFsiA9030325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 31 Jul 2015 11:54:45 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: Commit: M32R: Fix handling of the __model__ attribute Date: Fri, 31 Jul 2015 16:10:00 -0000 Message-ID: <873804gw58.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02680.txt.bz2 Hi Guys, I am checking in the patch below to fix the M32R port's handling of its __model__ attribute. This attribute takes a parameter identifying the memory model to use, but gcc was not being told to expect this identifier. Cheers Nick gcc/ChangeLog 2015-07-31 Nick Clifton * config/m32r/m32r.c (m32r_attribute_identifier): New function. Returns true for __model__. (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define. Index: gcc/config/m32r/m32r.c =================================================================== --- gcc/config/m32r/m32r.c (revision 226444) +++ gcc/config/m32r/m32r.c (working copy) @@ -113,6 +113,7 @@ static void m32r_conditional_register_usage (void); static void m32r_trampoline_init (rtx, tree, rtx); static bool m32r_legitimate_constant_p (machine_mode, rtx); +static bool m32r_attribute_identifier (const_tree); /* M32R specific attributes. */ @@ -129,6 +130,8 @@ /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE m32r_attribute_table +#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P +#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P m32r_attribute_identifier #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P m32r_legitimate_address_p @@ -404,6 +407,13 @@ return NULL_TREE; } + +static bool +m32r_attribute_identifier (const_tree name) +{ + return strcmp (IDENTIFIER_POINTER (name), "model") == 0 + || strcmp (IDENTIFIER_POINTER (name), "__model__") == 0; +} /* Encode section information of DECL, which is either a VAR_DECL, FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???.