From patchwork Mon Jan 14 17:30:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 211851 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 3B08C2C00A2 for ; Tue, 15 Jan 2013 04:30:59 +1100 (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=1358789460; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=qNJUv12 IlwCvn9KcnRZXGgs9xCM=; b=LHKBvgM2zx7KuCuS5aaKjJaoQJqUQFGyw7Plmyv t4r4ICjVA1t8LoWBMBZuHXAWwuq8R9slPFW3OI50CxKq9OLyKj/fZRtC+/QK2Hbw NVHOg8lO5utm/11fDhha5HCJp440VXN0we1wdX3COP81itCfFHAqdAaD/kVCyk5F g3C0= 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:X-RZG-AUTH:X-RZG-CLASS-ID:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=nMpHqeGMvrsPVQB6Kww8hyuWgl2Ny/R2CuhVsuZ8GPGFAqFTxlAYmEtck8qpBo e3tpDGn8Dul8m+kdrZZJHoBWfftbbhhHeJgl27QU4MznKLPWs8bawa/9bAC6etdt ObguS+5y5ZvwRS8AV5q4RQyMD6fp2mBb406by2YcBv9D8=; Received: (qmail 12847 invoked by alias); 14 Jan 2013 17:30:51 -0000 Received: (qmail 12834 invoked by uid 22791); 14 Jan 2013 17:30:50 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jan 2013 17:30:42 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by smtp.strato.de (josoe mo16) (RZmta 31.12 AUTH) with ESMTPA id L07723p0EGcISd ; Mon, 14 Jan 2013 18:30:36 +0100 (CET) Message-ID: <50F440BC.3010708@gjlay.de> Date: Mon, 14 Jan 2013 18:30:36 +0100 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Denis Chertykov , Eric Weddington Subject: [patch,avr]: 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 This patch is a no-op change that uses typedefs starting with avr_ in order to make clear that they are in the avr "namespace". Old types were: struct base_arch_s, struct arch_info_s, struct mcu_type_s. avr-cross builds fine. Ok to apply? * config/avr/avr-arch.h (struct base_arch_s): Use typedef avr_arch_t instead. (struct arch_info_s): Use typedef avr_arch_info_t instead. (struct mcu_type_s): Use typedef avr_mcu_t instead. * config/avr/avr.c: Same. * config/avr/avr-devices.c: Same. * config/avr/driver-avr.c: Same. * config/avr/gen-avr-mmcu-texi.c: Same. * config/avr/avr-mcus.def: Adjust comment. Index: config/avr/gen-avr-mmcu-texi.c =================================================================== --- config/avr/gen-avr-mmcu-texi.c (revision 195150) +++ config/avr/gen-avr-mmcu-texi.c (working copy) @@ -85,7 +85,7 @@ int main (void) { enum avr_arch arch = ARCH_UNKNOWN; size_t i, n_mcus = 0; - const struct mcu_type_s *mcu; + const avr_mcu_t *mcu; printf ("@c Copyright (C) 2012-2013 Free Software Foundation, Inc.\n"); printf ("@c This is part of the GCC manual.\n"); Index: config/avr/avr-arch.h =================================================================== --- config/avr/avr-arch.h (revision 195151) +++ config/avr/avr-arch.h (working copy) @@ -45,7 +45,7 @@ enum avr_arch /* Architecture-specific properties. */ -struct base_arch_s +typedef struct { /* Assembler only. */ int asm_only; @@ -87,12 +87,12 @@ struct base_arch_s /* Architecture name. */ const char *const arch_name; -}; +} avr_arch_t; /* Device-specific properties. */ -struct mcu_type_s +typedef struct { /* Device name. */ const char *const name; @@ -134,22 +134,23 @@ struct mcu_type_s /* Name of device library. */ const char *const library_name; -}; +} avr_mcu_t; /* Map architecture to its texinfo string. */ -struct arch_info_s +typedef struct { /* Architecture ID. */ enum avr_arch arch; /* textinfo source to describe the archtiecture. */ const char *texinfo; -}; +} avr_arch_info_t; /* Preprocessor macros to define depending on MCU type. */ -extern const struct base_arch_s *avr_current_arch; -extern const struct mcu_type_s *avr_current_device; -extern const struct mcu_type_s avr_mcu_types[]; -extern const struct base_arch_s avr_arch_types[]; +extern const avr_arch_t avr_arch_types[]; +extern const avr_arch_t *avr_current_arch; + +extern const avr_mcu_t avr_mcu_types[]; +extern const avr_mcu_t *avr_current_device; Index: config/avr/avr-devices.c =================================================================== --- config/avr/avr-devices.c (revision 195151) +++ config/avr/avr-devices.c (working copy) @@ -27,7 +27,7 @@ /* List of all known AVR MCU architectures. Order as of enum avr_arch from avr.h. */ -const struct base_arch_s +const avr_arch_t avr_arch_types[] = { /* unknown device specified */ @@ -56,7 +56,7 @@ avr_arch_types[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0x2000, 0, "107", "avrxmega7" } }; -const struct arch_info_s +const avr_arch_info_t avr_texinfo[] = { { ARCH_AVR1, @@ -101,9 +101,11 @@ avr_texinfo[] = "and more than 64@tie{}KiB of RAM." } }; -const struct mcu_type_s avr_mcu_types[] = { -#define AVR_MCU(NAME,ARCH,MACRO,SHORT_SP,ERRATA_SKIP,DATA_SEC,N_FLASH,LIB_NAME)\ - { NAME, ARCH, MACRO, SHORT_SP, ERRATA_SKIP, DATA_SEC, N_FLASH, LIB_NAME }, +const avr_mcu_t +avr_mcu_types[] = +{ +#define AVR_MCU(NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME)\ + { NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME }, #include "avr-mcus.def" #undef AVR_MCU /* End of list. */ Index: config/avr/avr-mcus.def =================================================================== --- config/avr/avr-mcus.def (revision 195150) +++ config/avr/avr-mcus.def (working copy) @@ -39,7 +39,7 @@ AVR_MCU (NAME, ARCH, MACRO, SHORT_SP, ERRATA_SKIP, DATA_SEC, N_FLASH, LIBRARY_NAME) - where the arguments are the fields of struct mcu_type_s: + where the arguments are the fields of avr_mcu_t: NAME Accept -mmcu= Index: config/avr/driver-avr.c =================================================================== --- config/avr/driver-avr.c (revision 195150) +++ config/avr/driver-avr.c (working copy) @@ -24,10 +24,10 @@ along with GCC; see the file COPYING3. #include "tm.h" /* Current architecture. */ -const struct base_arch_s *avr_current_arch = NULL; +const avr_arch_t *avr_current_arch = NULL; /* Current device. */ -const struct mcu_type_s *avr_current_device = NULL; +const avr_mcu_t *avr_current_device = NULL; /* Initialize avr_current_arch and avr_current_device variables. */ Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 195151) +++ config/avr/avr.c (working copy) @@ -184,10 +184,10 @@ static GTY(()) rtx xstring_empty; static GTY(()) rtx xstring_e; /* Current architecture. */ -const struct base_arch_s *avr_current_arch; +const avr_arch_t *avr_current_arch; /* Current device. */ -const struct mcu_type_s *avr_current_device; +const avr_mcu_t *avr_current_device; /* Section to put switch tables in. */ static GTY(()) section *progmem_swtable_section;