From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87025 invoked by alias); 26 Aug 2015 14:53:29 -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 85993 invoked by uid 89); 26 Aug 2015 14:53:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout09.t-online.de Received: from mailout09.t-online.de (HELO mailout09.t-online.de) (194.25.134.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 26 Aug 2015 14:53:22 +0000 Received: from fwd00.aul.t-online.de (fwd00.aul.t-online.de [172.20.26.147]) by mailout09.t-online.de (Postfix) with SMTP id 999AC62A5E7; Wed, 26 Aug 2015 16:53:18 +0200 (CEST) Received: from [192.168.0.10] (TF7gf2ZLZh+VzsZpZGeYa2eGg-SRqq4Y2G06jA5m7uSgepktQckCG2B73qZK7ykZFe@[219.110.29.36]) by fwd00.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1ZUc4j-2K2sPg0; Wed, 26 Aug 2015 16:53:17 +0200 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [PATCH][4/N] Introduce new inline functions for GET_MODE_UNIT_SIZE and GET_MODE_UNIT_PRECISION From: Oleg Endo In-Reply-To: <4627DC74-863C-4B7A-8883-B7C31749A94F@t-online.de> Date: Wed, 26 Aug 2015 14:54:00 -0000 Cc: David Sherwood , GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: 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> To: Jeff Law X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01631.txt.bz2 On 26 Aug 2015, at 23:27, Oleg Endo wrote: >=20 > On 19 Aug 2015, at 22:35, Jeff Law wrote: >=20 >> 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 w= as >>>> worded. >>>>=20 >>>> 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. >>>=20 >>> Good to go? >>> David. >>>=20 >>> ChangeLog: >>>=20 >>> 2015-08-19 David Sherwood >>>=20 >>> 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. >>=20 >> Thanks, this is OK for the trunk. >=20 > It seems this broke sh-elf, at least when compiling on OSX with its nativ= e clang. >=20 > ../../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_MODE= S]; > ^ > ./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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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_MOD= ES];\n\ switch (mode)\n\ {"); Cheers, Oleg