From patchwork Wed Aug 26 14:53:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 510896 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8918F14033E for ; Thu, 27 Aug 2015 00:53:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=hZUTOQEN; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= default; b=hCYPlGzxWoWfB7Ol6EQquvKlOT/F/z89P1gNOFPB64C3/Y1MeGwpE QjNVsssX3gVtVELEXezYLkhFQWCSq+Wvvbw+HuyfQuGWGNjCVosxxfcokBsyRySD +z+U8ILahCkXhYSRsCBbMMX0KYFeznADJvm1+6aJkbJvToqr1JJkcU= 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 :content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=default; bh=lWHtvNoBp8tatdL2vD7VbP/rbuM=; b=hZUTOQEN+jBIQcvomNZ7UYCAYfBr QNwkEEgKiHfSxtdylVP5OeykeHgfxZFKLxHyUqPbMnTj4L3cB+bPZEGaScjfvjz6 kHLWvdhGgTe6xxV+MeL8fgcvh/0Cti4kJ7c43zT6tIGHIzb9f3MG88tRRB6sZZGM HoBaIvsW1mnjwYg= 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-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 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 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 23:53:11 +0900 Cc: David Sherwood , GCC Patches 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 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: Cheers, Oleg 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\ {");