From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127146 invoked by alias); 1 Sep 2015 06:01:47 -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 127131 invoked by uid 89); 1 Sep 2015 06:01:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no 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; Tue, 01 Sep 2015 06:01:45 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id A5885ABB; Tue, 1 Sep 2015 06:01:43 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8161gxF022052; Tue, 1 Sep 2015 02:01:43 -0400 Subject: Re: [PATCH][4/N] Introduce new inline functions for GET_MODE_UNIT_SIZE and GET_MODE_UNIT_PRECISION To: Oleg Endo References: <000101d0d8e1$2c74fcd0$855ef670$@arm.com> <55D38638.3050403@redhat.com> <000001d0da7a$a261d450$e7257cf0$@arm.com> <55D4861D.1060907@redhat.com> <4627DC74-863C-4B7A-8883-B7C31749A94F@t-online.de> Cc: David Sherwood , GCC Patches From: Jeff Law Message-ID: <55E53F46.8020707@redhat.com> Date: Tue, 01 Sep 2015 06:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00002.txt.bz2 On 08/26/2015 08:53 AM, Oleg Endo wrote: > > On 26 Aug 2015, at 23:27, Oleg Endo wrote: > >> >> On 19 Aug 2015, at 22:35, Jeff Law wrote: >> >>> On 08/19/2015 06:29 AM, David Sherwood wrote: >>>>> I asked Richard S. to give this a once-over which he did. However, he >>>>> technically can't approve due to the way his maintainership position was >>>>> worded. >>>>> >>>>> The one request would be a function comment for emit_mode_unit_size and >>>>> emit_mode_unit_precision. OK with that change. >>>> Thanks. Here's a new patch with the comments added. >>>> >>>> Good to go? >>>> David. >>>> >>>> ChangeLog: >>>> >>>> 2015-08-19 David Sherwood >>>> >>>> gcc/ >>>> * genmodes.c (emit_mode_unit_size_inline): New function. >>>> (emit_mode_unit_precision_inline): New function. >>>> (emit_insn_modes_h): Emit new #define. Emit new functions. >>>> (emit_mode_unit_size): New function. >>>> (emit_mode_unit_precision): New function. >>>> (emit_mode_adjustments): Add mode_unit_size adjustments. >>>> (emit_insn_modes_c): Emit new arrays. >>>> * machmode.h (GET_MODE_UNIT_SIZE, GET_MODE_UNIT_PRECISION): Update to >>>> use new inline methods. >>> >>> Thanks, this is OK for the trunk. >> >> It seems this broke sh-elf, at least when compiling on OSX with its native clang. >> >> ../../gcc-trunk/gcc/machmode.h:228:43: error: redefinition of 'mode_unit_size' with a different type: >> 'const unsigned char [56]' vs 'unsigned char [56]' >> extern CONST_MODE_UNIT_SIZE unsigned char mode_unit_size[NUM_MACHINE_MODES]; >> ^ >> ./insn-modes.h:417:24: note: previous definition is here >> extern unsigned char mode_unit_size[NUM_MACHINE_MODES]; >> ^ > > This following fixes the problem for me: > > Index: gcc/genmodes.c > =================================================================== > --- gcc/genmodes.c (revision 227221) > +++ gcc/genmodes.c (working copy) > @@ -1063,7 +1063,7 @@ > unsigned char\n\ > mode_unit_size_inline (machine_mode mode)\n\ > {\n\ > - extern unsigned char mode_unit_size[NUM_MACHINE_MODES];\n\ > + extern CONST_MODE_UNIT_SIZE unsigned char mode_unit_size[NUM_MACHINE_MODES];\n\ > switch (mode)\n\ > {"); OK with the usual testing. jeff