From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26672 invoked by alias); 9 May 2014 09:01:32 -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 26659 invoked by uid 89); 9 May 2014 09:01:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 May 2014 09:01:30 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 09 May 2014 10:01:27 +0100 Received: from [10.1.208.33] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 May 2014 10:01:33 +0100 Message-ID: <536C9964.3030303@arm.com> Date: Fri, 09 May 2014 09:01:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: "Joseph S. Myers" , ramrad01@arm.com, gcc-patches , zadeck@naturalbridge.com, Mike Stump , Richard Henderson , rdsandiford@googlemail.com Subject: Re: [wide-int] Add fast path for hosts with HWI widening multiplication References: <8761r8kgph.fsf@talisman.default> <871u1sdbb6.fsf@talisman.default> <87vbtg2kcq.fsf@talisman.default> In-Reply-To: <87vbtg2kcq.fsf@talisman.default> X-MC-Unique: 114050910012702601 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00578.txt.bz2 On 08/05/14 19:31, Richard Sandiford wrote: > "Joseph S. Myers" writes: >> On Thu, 8 May 2014, Ramana Radhakrishnan wrote: >> >>> Ramana Radhakrishnan >>> >>> * wide-int.cc (UTItype): Define. >>> (UDWtype): Define for appropriate W_TYPE_SIZE. >> >> This breaks builds for 32-bit hosts, where TImode isn't supported. You= =20 >> can only use TImode on the host if it's 64-bit. >> >> wide-int.cc:37:56: error: unable to emulate 'TI' >=20 > The longlong.h interface seems to be designed to be as difficult to use > as possible :-( So maybe we really do need to limit it to hosts that are > known to work and benefit from it. >=20 > How about the following? I tested that it produces identical > wide-int.o .text for x86_64. >=20 > I think additions to or removals from the list should be treated as > pre-approved. >=20 > Thanks, > Richard >=20 >=20 > gcc/ > * wide-int.cc: Only include longlong.h for certain targets. >=20 > Index: gcc/wide-int.cc > =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/wide-int.cc 2014-05-08 19:13:15.782158808 +0100 > +++ gcc/wide-int.cc 2014-05-08 19:28:52.880742385 +0100 > @@ -27,19 +27,20 @@ along with GCC; see the file COPYING3. > #include "tree.h" > #include "dumpfile.h" >=20=20 > -#if GCC_VERSION >=3D 3000 > +#if (GCC_VERSION >=3D 3000 \ > + && (defined __aarch64 \ Needs tailing underscores: __aarch64__ R. > + || defined __alpha \ > + || defined __ia64 \ > + || defined __powerpc64__ \ > + || defined __sparcv9 \ > + || defined __x86_64__)) > #define W_TYPE_SIZE HOST_BITS_PER_WIDE_INT > -typedef unsigned HOST_HALF_WIDE_INT UHWtype; > -typedef unsigned HOST_WIDE_INT UWtype; > typedef unsigned int UQItype __attribute__ ((mode (QI))); > typedef unsigned int USItype __attribute__ ((mode (SI))); > typedef unsigned int UDItype __attribute__ ((mode (DI))); > -typedef unsigned int UTItype __attribute__ ((mode (TI))); > -#if W_TYPE_SIZE =3D=3D 32 > -# define UDWtype UDItype > -#elif W_TYPE_SIZE =3D=3D 64 > -# define UDWtype UTItype > -#endif > +typedef unsigned HOST_HALF_WIDE_INT UHWtype; > +typedef unsigned HOST_WIDE_INT UWtype; > +typedef unsigned int UDWtype __attribute__ ((mode (TI))); > #include "longlong.h" > #endif >=20=20 >=20