From patchwork Tue Dec 3 23:55:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 296360 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E94C42C00A9 for ; Wed, 4 Dec 2013 10:55:37 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=pFi/gK8N1IjqYRNL jjIQ71dOxJMfiad40L66xABhxA9dzWFJ/6YcyPmdRwf+S/5BcDrbhL0AczxsWAkg ORtjXxXbOGpHDGdPQEpUJHCePuux6Tbe7yVRVHGSVW+Hm0rSXvNlXJrA2I0qll6F 3Su1+byP0rpOPDxiv7Q5TG4Qd5w= 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=qGVAFQUbSJp4hn2YUjcfle l0PSY=; b=Z3H53pEi0oXDp+m21csRqM/r+gAoXhrGpZmupGW7Ds/b/A3K4Oo03u dErzDApyC5Z1dUW4EN1oVEQOjXj1o0k84lXUrW8VUNpk1NDQAHMEbZgJK0DNf8x7 sw9Bo50qGK2u1XtHsoyHA159800OW6qPgKcjOqOKzBsoVaT1jHXrI= Received: (qmail 5939 invoked by alias); 3 Dec 2013 23:55:26 -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 5930 invoked by uid 89); 3 Dec 2013 23:55:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RDNS_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-wi0-f174.google.com Received: from Unknown (HELO mail-wi0-f174.google.com) (209.85.212.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 03 Dec 2013 23:55:25 +0000 Received: by mail-wi0-f174.google.com with SMTP id z2so5890671wiv.13 for ; Tue, 03 Dec 2013 15:55:16 -0800 (PST) X-Received: by 10.180.91.11 with SMTP id ca11mr4737695wib.39.1386114916007; Tue, 03 Dec 2013 15:55:16 -0800 (PST) Received: from localhost ([2.28.235.199]) by mx.google.com with ESMTPSA id dj8sm1603614wid.2.2013.12.03.15.55.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Dec 2013 15:55:15 -0800 (PST) From: Richard Sandiford To: Paolo Bonzini Mail-Followup-To: Paolo Bonzini , Ian Lance Taylor , gcc-patches , Kenneth Zadeck , Mike Stump , rdsandiford@googlemail.com Cc: Ian Lance Taylor , gcc-patches , Kenneth Zadeck , Mike Stump Subject: Re: [wide-int] Add fast path for hosts with HWI widening multiplication References: <8761r8kgph.fsf@talisman.default> <877gbndp2m.fsf@talisman.default> <529CE3EC.4020906@gnu.org> Date: Tue, 03 Dec 2013 23:55:14 +0000 In-Reply-To: <529CE3EC.4020906@gnu.org> (Paolo Bonzini's message of "Mon, 02 Dec 2013 20:47:56 +0100") Message-ID: <87eh5tcwwt.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Paolo Bonzini writes: > Il 02/12/2013 20:34, Richard Sandiford ha scritto: >>>> >> I followed Joseph's suggestion and reused longlong.h. I copied it from >>>> >> libgcc rather than glibc since it seemed better for GCC to have a single >>>> >> version across both gcc/ and libgcc/. I can put it in include/ if that >>>> >> seems better. >>> > >>> > Actually copying complex code like this does not seem maintainable. I >>> > think there needs to be only one copy in the GCC sources. If that >>> > requires moving it back from libgcc to gcc, or moving it to include, >>> > do that. >> OK, will do, but which do you prefer? > > libgcc/ should not use gcc/ sources too much. Please put it in include/. OK, how about this, against trunk? Tested on x86_64-linux-gnu. Thanks, Richard include/ * longlong.h: New file. libgcc/ * longlong.h: Delete (moved to include/). libquadmath/ * Makefile.am (AM_CPPFLAGS): Define. * Makefile.in: Regenerate. * printf/gmp-impl.h: Remove path from longlong.h include. Index: libquadmath/Makefile.am =================================================================== --- libquadmath/Makefile.am 2012-11-03 09:21:21.000000000 +0000 +++ libquadmath/Makefile.am 2013-12-03 19:30:02.551636610 +0000 @@ -6,6 +6,7 @@ AUTOMAKE_OPTIONS = 1.8 foreign ## Skip over everything if the quadlib is not available: if BUILD_LIBQUADMATH ACLOCAL_AMFLAGS = -I .. -I ../config +AM_CPPFLAGS = -I $(top_srcdir)/../include ## May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) Index: libquadmath/Makefile.in =================================================================== --- libquadmath/Makefile.in 2013-11-18 14:46:49.994728318 +0000 +++ libquadmath/Makefile.in 2013-12-03 19:31:06.828134039 +0000 @@ -310,6 +310,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.8 foreign @BUILD_LIBQUADMATH_TRUE@ACLOCAL_AMFLAGS = -I .. -I ../config +@BUILD_LIBQUADMATH_TRUE@AM_CPPFLAGS = -I $(top_srcdir)/../include @BUILD_LIBQUADMATH_TRUE@gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_FALSE@version_arg = @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/quadmath.map Index: libquadmath/printf/gmp-impl.h =================================================================== --- libquadmath/printf/gmp-impl.h 2013-12-03 19:20:58.167441116 +0000 +++ libquadmath/printf/gmp-impl.h 2013-12-03 19:21:07.093509627 +0000 @@ -60,7 +60,7 @@ #define attribute_hidden __attribute__(( #define attribute_hidden #endif -#include "../../libgcc/longlong.h" +#include "longlong.h" /* Copy NLIMBS *limbs* from SRC to DST. */ #define MPN_COPY_INCR(DST, SRC, NLIMBS) \