From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 12:50:33 2012 Received: (at submit) by debbugs.gnu.org; 29 Nov 2012 17:50:33 +0000 Received: from localhost ([127.0.0.1]:45472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te8Fs-0005o1-Pd for submit@debbugs.gnu.org; Thu, 29 Nov 2012 12:50:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43409) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te58X-0000yg-Lv for submit@debbugs.gnu.org; Thu, 29 Nov 2012 09:30:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te56a-0004d4-2l for submit@debbugs.gnu.org; Thu, 29 Nov 2012 09:28:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te56Z-0004d0-Vp for submit@debbugs.gnu.org; Thu, 29 Nov 2012 09:28:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te56U-0001Zg-74 for bug-coreutils@gnu.org; Thu, 29 Nov 2012 09:28:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te56H-0004Y0-Or for bug-coreutils@gnu.org; Thu, 29 Nov 2012 09:28:38 -0500 Received: from chiark.greenend.org.uk ([212.13.197.229]:42177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te56H-0004XD-Ir for bug-coreutils@gnu.org; Thu, 29 Nov 2012 09:28:25 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1Te56E-0001da-Pb for bug-coreutils@gnu.org; Thu, 29 Nov 2012 14:28:23 +0000 Received: from localhost ([127.0.0.1] helo=sarantium.pelham.vpn.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.72) (envelope-from ) id 1Te56D-0007SQ-RU for bug-coreutils@gnu.org; Thu, 29 Nov 2012 14:28:21 +0000 Received: from riva.dynamic.greenend.org.uk (localhost [127.0.0.1]) by sarantium.pelham.vpn.ucam.org (Postfix) with ESMTPS id 952A53E41D2 for ; Thu, 29 Nov 2012 14:28:19 +0000 (GMT) Date: Thu, 29 Nov 2012 14:28:18 +0000 From: Colin Watson To: bug-coreutils@gnu.org Subject: factor: infinite loop on Linux/powerpc Message-ID: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Debbugs-Cc: coreutils@packages.debian.org User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 29 Nov 2012 12:50:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Both Debian and Ubuntu builds of coreutils 8.20 hang while running the test suite on powerpc. This turns out to be reproducible using 'factor 122'. This turns out to be somewhat related to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12754, but not quite the same. uintmax_t is 64 bits, but the cntlzw instruction takes 32-bit operands, and the cntlzd option is only available on 64-bit hardware. I believe the correct answer is to add an _LP64 check around the PPC64 code, so that this falls back to the C implementations: --- coreutils-8.20~/src/longlong.h 2012-11-29 14:25:07.000000000 +0000 +++ coreutils-8.20/src/longlong.h 2012-11-29 14:26:40.000000000 +0000 @@ -1398,7 +1398,7 @@ /* We should test _IBMR2 here when we add assembly support for the system vendor compilers. */ -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64 +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64 && defined (_LP64) #if !defined (_LONG_LONG_LIMB) /* _LONG_LONG_LIMB is ABI=mode32 where adde operates on 32-bit values. So use adde etc only when not _LONG_LONG_LIMB. */ Thanks, -- Colin Watson [cjwatson@ubuntu.com] From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 14:36:13 2012 Received: (at 13030-done) by debbugs.gnu.org; 29 Nov 2012 19:36:13 +0000 Received: from localhost ([127.0.0.1]:45569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te9u9-0000mM-0k for submit@debbugs.gnu.org; Thu, 29 Nov 2012 14:36:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11622) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te9u6-0000mE-Oc for 13030-done@debbugs.gnu.org; Thu, 29 Nov 2012 14:36:11 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qATJY7xa011395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Nov 2012 14:34:08 -0500 Received: from [10.36.116.83] (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qATJY4Gk032196 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 29 Nov 2012 14:34:05 -0500 Message-ID: <50B7B8AB.6040401@draigBrady.com> Date: Thu, 29 Nov 2012 19:34:03 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Colin Watson Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> In-Reply-To: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id qATJY7xa011395 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13030-done Cc: coreutils@packages.debian.org, 13030-done@debbugs.gnu.org, Torbjorn Granlund X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 11/29/2012 02:28 PM, Colin Watson wrote: > Both Debian and Ubuntu builds of coreutils 8.20 hang while running the > test suite on powerpc. This turns out to be reproducible using 'factor > 122'. > > This turns out to be somewhat related to > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12754, but not quite the > same. uintmax_t is 64 bits, but the cntlzw instruction takes 32-bit > operands, and the cntlzd option is only available on 64-bit hardware. = I > believe the correct answer is to add an _LP64 check around the PPC64 > code, so that this falls back to the C implementations: > > --- coreutils-8.20~/src/longlong.h 2012-11-29 14:25:07.000000000 +0000 > +++ coreutils-8.20/src/longlong.h 2012-11-29 14:26:40.000000000 +0000 > @@ -1398,7 +1398,7 @@ > > /* We should test _IBMR2 here when we add assembly support for the sy= stem > vendor compilers. */ > -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 > +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 && defined (= _LP64) > #if !defined (_LONG_LONG_LIMB) > /* _LONG_LONG_LIMB is ABI=3Dmode32 where adde operates on 32-bit valu= es. So > use adde etc only when not _LONG_LONG_LIMB. */ > > Thanks, > The fix looks good thanks. I'll commit that in your name along with this NEWS entry: ** Bug fixes factor no longer hangs on 32 bit powerpc systems. [bug introduced in coreutil-8.20] thanks, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 14:38:44 2012 Received: (at 13030-done) by debbugs.gnu.org; 29 Nov 2012 19:38:44 +0000 Received: from localhost ([127.0.0.1]:45576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te9wa-0000q9-Iu for submit@debbugs.gnu.org; Thu, 29 Nov 2012 14:38:44 -0500 Received: from gmplib-02.nada.kth.se ([130.237.222.242]:64187 helo=shell.gmplib.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Te9wX-0000py-Db for 13030-done@debbugs.gnu.org; Thu, 29 Nov 2012 14:38:43 -0500 Received: by shell.gmplib.org (Postfix, from userid 1001) id DF4031A6B27; Thu, 29 Nov 2012 20:36:38 +0100 (CET) To: =?utf-8?Q?P=C3=A1draig?= Brady Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> From: Torbjorn Granlund Date: Thu, 29 Nov 2012 20:36:38 +0100 In-Reply-To: <50B7B8AB.6040401@draigBrady.com> (=?utf-8?Q?=22P=C3=A1draig?= Brady"'s message of "Thu\, 29 Nov 2012 19\:34\:03 +0000") Message-ID: <86obignqux.fsf@shell.gmplib.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13030-done Cc: 13030-done@debbugs.gnu.org, Colin Watson , coreutils@packages.debian.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) P=C3=A1draig Brady writes: > -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 > +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 && defined (= _LP64) > #if !defined (_LONG_LONG_LIMB) > /* _LONG_LONG_LIMB is ABI=3Dmode32 where adde operates on 32-bit valu= es. So > use adde etc only when not _LONG_LONG_LIMB. */ > > Thanks, > =20=20 I suppose it might be much better to make W_TYPE_SIZE not be set to a size not supported by the present ABI. That way, we will avoid longlong.h divergence. --=20 Torbj=C3=B6rn From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 15:10:53 2012 Received: (at 13030) by debbugs.gnu.org; 29 Nov 2012 20:10:53 +0000 Received: from localhost ([127.0.0.1]:45590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeARg-0001c8-Qo for submit@debbugs.gnu.org; Thu, 29 Nov 2012 15:10:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33893) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeARe-0001c0-N5 for 13030@debbugs.gnu.org; Thu, 29 Nov 2012 15:10:52 -0500 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 (8.14.4/8.14.4) with ESMTP id qATK8l4s004424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Nov 2012 15:08:47 -0500 Received: from [10.36.116.83] (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qATK8hPi001825 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 29 Nov 2012 15:08:45 -0500 Message-ID: <50B7C0CB.3030101@draigBrady.com> Date: Thu, 29 Nov 2012 20:08:43 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Torbjorn Granlund Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <86obignqux.fsf@shell.gmplib.org> In-Reply-To: <86obignqux.fsf@shell.gmplib.org> Content-Type: text/plain; charset=UTF-8; format=flowed X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id qATK8l4s004424 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13030 Cc: 13030@debbugs.gnu.org, Colin Watson , coreutils@packages.debian.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) On 11/29/2012 07:36 PM, Torbjorn Granlund wrote: > P=C3=A1draig Brady writes: > > > -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 > > +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 && defi= ned (_LP64) > > #if !defined (_LONG_LONG_LIMB) > > /* _LONG_LONG_LIMB is ABI=3Dmode32 where adde operates on 32-bit= values. So > > use adde etc only when not _LONG_LONG_LIMB. */ > > > > Thanks, > > > > I suppose it might be much better to make W_TYPE_SIZE not be set to a > size not supported by the present ABI. > > That way, we will avoid longlong.h divergence. So that's a bit in contradiction to: http://bugs.gnu.org/12754#20 So you're suggesting that this would be safest? diff --git a/src/factor.c b/src/factor.c index 6d1d17a..d2a4158 100644 --- a/src/factor.c +++ b/src/factor.c @@ -126,11 +126,11 @@ /* Make definitions for longlong.h to make it do what it can do for us = */ /* bitcount for uintmax_t */ -# if UINTMAX_MAX =3D=3D UINT32_MAX +# if ULONG_MAX =3D=3D UINT32_MAX # define W_TYPE_SIZE 32 -# elif UINTMAX_MAX =3D=3D UINT64_MAX +# elif ULONG_MAX =3D=3D UINT64_MAX # define W_TYPE_SIZE 64 -# elif UINTMAX_MAX =3D=3D UINT128_MAX +# elif ULONG_MAX =3D=3D UINT128_MAX # define W_TYPE_SIZE 128 # endif In this particular case that would enable the 32 bit ppc assembly in longlong.h thanks, P=C3=A1draig. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 03:58:25 2012 Received: (at 13030) by debbugs.gnu.org; 5 Dec 2012 08:58:25 +0000 Received: from localhost ([127.0.0.1]:54273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgAoC-0007Oh-Oq for submit@debbugs.gnu.org; Wed, 05 Dec 2012 03:58:25 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:59645) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgAoA-0007OY-6N for 13030@debbugs.gnu.org; Wed, 05 Dec 2012 03:58:23 -0500 Received: from [192.168.1.11] (p4FF74A6C.dip.t-dialin.net [79.247.74.108]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MBI8r-1TW1uz3YqT-00AsgU; Wed, 05 Dec 2012 09:58:13 +0100 Message-ID: <50BF0CA3.3070306@bernhard-voelker.de> Date: Wed, 05 Dec 2012 09:58:11 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: 13030@debbugs.gnu.org, cjwatson@ubuntu.com Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> In-Reply-To: <50B7B8AB.6040401@draigBrady.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:Y0pGU7kocL/aT+TFPsUAFSgDavHqWTGtfI35CsXzbZp vV/XDwjflPKb990OgDiBU28aHR/ac+L+GrSOeDHmyLZuR40a5K qz1FV8gO9AoqO80fdyOrUeko1l4hlKd8Q1Yul145pTG6V0tsnO 9GtFzSNMklBIDdfUxIfymYvu7oLMwpAMcXcCe7aU87YlmA0Q1X gbduF3FyxcLg2vMD+i/qUJxMtvayp2YvFUZCzEa91lBZaGIJ/W rErDmli4kIBiGYEO03E4FZwhipmyZ8Of0aNBir+EnH885qAifE Tpt1MQVR5vpKERCNUbvUvv1Oxt4qKoHOnEwm5cdDyXZa5HlCZ0 qWcNguBJUSTBAtHJQTR7r+ImDjp7kqYyUEqhbui3n X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13030 Cc: P@draigBrady.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) On 11/29/2012 08:34 PM, Pádraig Brady wrote: > On 11/29/2012 02:28 PM, Colin Watson wrote: > The fix looks good thanks. > I'll commit [...] Now, "make syntax-check" fails: Colin Watson maint.mk: remove the above names from THANKS.in make: *** [sc_THANKS_in_duplicates] Error 1 Before removing that entry: Are you the same Colin Watson as in THANKS.in? Colin Watson cjw44@riva.ucam.org Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 05:08:40 2012 Received: (at 13030) by debbugs.gnu.org; 5 Dec 2012 10:08:40 +0000 Received: from localhost ([127.0.0.1]:54315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgBuB-0000Zp-KO for submit@debbugs.gnu.org; Wed, 05 Dec 2012 05:08:40 -0500 Received: from chiark.greenend.org.uk ([212.13.197.229]:49336) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgBu8-0000Zh-NK for 13030@debbugs.gnu.org; Wed, 05 Dec 2012 05:08:37 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1TgBu1-0003oy-63; Wed, 05 Dec 2012 10:08:29 +0000 Received: from localhost ([127.0.0.1] helo=sarantium.pelham.vpn.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.72) (envelope-from ) id 1TgBu0-0006sV-1F; Wed, 05 Dec 2012 10:08:28 +0000 Received: from riva.dynamic.greenend.org.uk (localhost [127.0.0.1]) by sarantium.pelham.vpn.ucam.org (Postfix) with ESMTPS id A217A3E40C3; Wed, 5 Dec 2012 10:08:19 +0000 (GMT) Date: Wed, 5 Dec 2012 10:08:18 +0000 From: Colin Watson To: Bernhard Voelker Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc Message-ID: <20121205100818.GX21216@riva.dynamic.greenend.org.uk> References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <50BF0CA3.3070306@bernhard-voelker.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <50BF0CA3.3070306@bernhard-voelker.de> User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13030 Cc: P@draigBrady.com, 13030@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) On Wed, Dec 05, 2012 at 09:58:11AM +0100, Bernhard Voelker wrote: > On 11/29/2012 08:34 PM, P=E1draig Brady wrote: > > The fix looks good thanks. > > I'll commit [...] >=20 > Now, "make syntax-check" fails: >=20 > Colin Watson > maint.mk: remove the above names from THANKS.in > make: *** [sc_THANKS_in_duplicates] Error 1 >=20 > Before removing that entry: > Are you the same Colin Watson as in THANKS.in? >=20 > Colin Watson cjw44@riva.ucam.org Yes, that's me. The new address is better. Cheers, --=20 Colin Watson [cjwatson@ubuntu.com] From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 05:52:09 2012 Received: (at 13030) by debbugs.gnu.org; 5 Dec 2012 10:52:09 +0000 Received: from localhost ([127.0.0.1]:54326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgCaD-0001ZW-Qp for submit@debbugs.gnu.org; Wed, 05 Dec 2012 05:52:09 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:60449) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgCa7-0001Z2-Rq for 13030@debbugs.gnu.org; Wed, 05 Dec 2012 05:52:03 -0500 Received: from [192.168.1.11] (p4FF74A6C.dip.t-dialin.net [79.247.74.108]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MD8ge-1TPgrJ3aNo-00H3zZ; Wed, 05 Dec 2012 11:51:50 +0100 Message-ID: <50BF2743.5070908@bernhard-voelker.de> Date: Wed, 05 Dec 2012 11:51:47 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Colin Watson Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <50BF0CA3.3070306@bernhard-voelker.de> <20121205100818.GX21216@riva.dynamic.greenend.org.uk> In-Reply-To: <20121205100818.GX21216@riva.dynamic.greenend.org.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:REV5bva2ZglZy9NiJHpt6llVWS9vQq4vYM43CDKtMNs YU1G/kQOLgcLGuiA0Fed9++5pzAIGD77bXIxZLxyOUxfMYN1tV Rod5ZWDvlXqb9nv2gKOcxEw0Wy1IW7l1XYI8hnhkZFy9XamYF5 RCwrqlaXS1Vtiz1F3be1g+79kD2f4xXmU1Ti/csWbWBPp67K45 AcTKcE4YMs2HJHQGdJPLA9mEs4TwyHpySt6OcgWFV2vsMe3FgF OCt47n4e1zZp+S9bWq85ZMnXR9ELG3P8+ElnWbGXFIliiDIQJa nUctIRWQayfMu/5gsdIojGPskVMF+QJgQS+71x6GCxDIrz6+xW NZq6odY5Aojy6rvgIkLn+wj4/59H3tYpvm7Do4Mk7 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13030 Cc: P@draigBrady.com, 13030@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) On 12/05/2012 11:08 AM, Colin Watson wrote: > On Wed, Dec 05, 2012 at 09:58:11AM +0100, Bernhard Voelker wrote: >> Now, "make syntax-check" fails: >> >> Colin Watson >> maint.mk: remove the above names from THANKS.in >> make: *** [sc_THANKS_in_duplicates] Error 1 >> >> Before removing that entry: >> Are you the same Colin Watson as in THANKS.in? >> >> Colin Watson cjw44@riva.ucam.org > > Yes, that's me. The new address is better. Thanks, I'll push this soon. Have a nice day, Berny >From 7b4c56b4c65b2b58c185908ff1cbdf0b0399140d Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 5 Dec 2012 11:47:18 +0100 Subject: [PATCH] maint: remove now auto-added entry from THANKS.in The syntax-check sc_THANKS_in_duplicates complained about that excess entry. * THANKS.in (Colin Watson): Remove entry, now that it will be automatically included in the generated THANKS file. --- THANKS.in | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/THANKS.in b/THANKS.in index 6a79e04..f0ef9b8 100644 --- a/THANKS.in +++ b/THANKS.in @@ -128,7 +128,6 @@ Chusslove Illich caslav.ilic@gmx.net Clark Morgan cmorgan@aracnet.com Clement Wang clem.wang@overture.com Colin Plumb colin@nyx.net -Colin Watson cjw44@riva.ucam.org Collin Rogowski collin@rogowski.de Cray-Cyber Project http://www.cray-cyber.org Cristian Cadar cristic@stanford.edu -- 1.7.7 From unknown Sat Jun 14 03:57:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 02 Jan 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 04 09:45:07 2013 Received: (at control) by debbugs.gnu.org; 4 Jan 2013 14:45:07 +0000 Received: from localhost ([127.0.0.1]:42883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tr8W9-0001Ci-NF for submit@debbugs.gnu.org; Fri, 04 Jan 2013 09:45:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11456) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tr8W1-0001Bu-Lq for control@debbugs.gnu.org; Fri, 04 Jan 2013 09:44:59 -0500 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 (8.14.4/8.14.4) with ESMTP id r04EinHC003618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jan 2013 09:44:50 -0500 Received: from [10.36.116.81] (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r04EilBR030602 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 4 Jan 2013 09:44:49 -0500 Message-ID: <50E6EADF.30608@draigBrady.com> Date: Fri, 04 Jan 2013 14:44:47 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.2 (--) unarchive 13030 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 04 09:47:21 2013 Received: (at 13030) by debbugs.gnu.org; 4 Jan 2013 14:47:21 +0000 Received: from localhost ([127.0.0.1]:42888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tr8YK-0001Gg-Iu for submit@debbugs.gnu.org; Fri, 04 Jan 2013 09:47:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46269) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tr8YG-0001GW-Py for 13030@debbugs.gnu.org; Fri, 04 Jan 2013 09:47:18 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r04El9dG004229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <13030@debbugs.gnu.org>; Fri, 4 Jan 2013 09:47:09 -0500 Received: from [10.36.116.81] (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r04El6nV016564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <13030@debbugs.gnu.org>; Fri, 4 Jan 2013 09:47:08 -0500 Message-ID: <50E6EB6A.1050003@draigBrady.com> Date: Fri, 04 Jan 2013 14:47:06 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: 13030@debbugs.gnu.org Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <86obignqux.fsf@shell.gmplib.org> <50B7C0CB.3030101@draigBrady.com> In-Reply-To: <50B7C0CB.3030101@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r04El9dG004229 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 13030 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 11/29/2012 08:08 PM, P=C3=A1draig Brady wrote: > On 11/29/2012 07:36 PM, Torbjorn Granlund wrote: >> P=C3=A1draig Brady writes: >> >> > -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 >> > +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE =3D=3D 64 && def= ined (_LP64) >> > #if !defined (_LONG_LONG_LIMB) >> > /* _LONG_LONG_LIMB is ABI=3Dmode32 where adde operates on 32-bi= t values. So >> > use adde etc only when not _LONG_LONG_LIMB. */ >> > >> > Thanks, >> > >> >> I suppose it might be much better to make W_TYPE_SIZE not be set to a >> size not supported by the present ABI. >> >> That way, we will avoid longlong.h divergence. > > So that's a bit in contradiction to: > http://bugs.gnu.org/12754#20 > > So you're suggesting that this would be safest? > > diff --git a/src/factor.c b/src/factor.c > index 6d1d17a..d2a4158 100644 > --- a/src/factor.c > +++ b/src/factor.c > @@ -126,11 +126,11 @@ > /* Make definitions for longlong.h to make it do what it can do for u= s */ > > /* bitcount for uintmax_t */ > -# if UINTMAX_MAX =3D=3D UINT32_MAX > +# if ULONG_MAX =3D=3D UINT32_MAX > # define W_TYPE_SIZE 32 > -# elif UINTMAX_MAX =3D=3D UINT64_MAX > +# elif ULONG_MAX =3D=3D UINT64_MAX > # define W_TYPE_SIZE 64 > -# elif UINTMAX_MAX =3D=3D UINT128_MAX > +# elif ULONG_MAX =3D=3D UINT128_MAX > # define W_TYPE_SIZE 128 > # endif > > In this particular case that would enable > the 32 bit ppc assembly in longlong.h If you do the above, you hit run time assertions like: $ factor 2123123123123123123123 factor: factor.c:974: mulredc2: Assertion `(a1 >> (32 - 1)) =3D=3D 0' fai= led. 32767000000000000000000:Aborted which makes sense as we're using uintmax_t throughout factor.c. But something general is required here rather than fixing up every architecture. I've just noticed that sparc v9 in 32 bit mode will also loop for ever with the above command with what's in place in longlong.h at present. So what I'm going to do is pull all the _LP64 amendments to longlong.h and instead avoid it completely with this in factor.c: diff --git a/src/factor.c b/src/factor.c index 473eee7..95451a5 100644 --- a/src/factor.c +++ b/src/factor.c @@ -118,7 +118,14 @@ #endif #ifndef USE_LONGLONG_H -# define USE_LONGLONG_H 1 +/* With the way we use longlong.h, it's only safe to use + when UWtype =3D UHWtype, as there were various cases + (as can be seen in the history for longlong.h) where + for example, _LP64 was required to enable W_TYPE_SIZE=3D=3D64 code, + to avoid compile time or run time issues. */ +# if LONG_MAX =3D=3D INTMAX_MAX +# define USE_LONGLONG_H 1 +# endif #endif #if USE_LONGLONG_H That works for i686 x86_64 and sparcv7 and sparcv9 at least. thanks, P=C3=A1draig. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 06 21:09:28 2013 Received: (at 13030) by debbugs.gnu.org; 7 Jan 2013 02:09:28 +0000 Received: from localhost ([127.0.0.1]:33381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts29Y-0000m4-4K for submit@debbugs.gnu.org; Sun, 06 Jan 2013 21:09:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48895) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts29S-0000lk-JI for 13030@debbugs.gnu.org; Sun, 06 Jan 2013 21:09:27 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0729EQN004196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <13030@debbugs.gnu.org>; Sun, 6 Jan 2013 21:09:15 -0500 Received: from [10.36.116.24] (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0729CFc000559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <13030@debbugs.gnu.org>; Sun, 6 Jan 2013 21:09:14 -0500 Message-ID: <50EA2E48.6030701@draigBrady.com> Date: Mon, 07 Jan 2013 02:09:12 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: 13030@debbugs.gnu.org Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <86obignqux.fsf@shell.gmplib.org> <50B7C0CB.3030101@draigBrady.com> <50E6EB6A.1050003@draigBrady.com> In-Reply-To: <50E6EB6A.1050003@draigBrady.com> Content-Type: multipart/mixed; boundary="------------010400030201060202090703" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 13030 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is a multi-part message in MIME format. --------------010400030201060202090703 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r0729EQN004196 On 01/04/2013 02:47 PM, P=C3=A1draig Brady wrote: > So what I'm going to do is pull all the _LP64 amendments to longlong.h > and instead avoid it completely with this in factor.c: > > diff --git a/src/factor.c b/src/factor.c > index 473eee7..95451a5 100644 > --- a/src/factor.c > +++ b/src/factor.c > @@ -118,7 +118,14 @@ > #endif > > #ifndef USE_LONGLONG_H > -# define USE_LONGLONG_H 1 > +/* With the way we use longlong.h, it's only safe to use > + when UWtype =3D UHWtype, as there were various cases > + (as can be seen in the history for longlong.h) where > + for example, _LP64 was required to enable W_TYPE_SIZE=3D=3D64 code, > + to avoid compile time or run time issues. */ > +# if LONG_MAX =3D=3D INTMAX_MAX > +# define USE_LONGLONG_H 1 > +# endif > #endif > > #if USE_LONGLONG_H > > That works for i686 x86_64 and sparcv7 and sparcv9 at least. No comments, so I'm pushing the attached. thanks, P=C3=A1draig. --------------010400030201060202090703 Content-Type: text/x-patch; name="factor-asm-general.diff" Content-Disposition: attachment; filename="factor-asm-general.diff" Content-Transfer-Encoding: 7bit >From 8292a881c3d55b5cd9deb24f001353244d811e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 4 Jan 2013 18:07:01 +0000 Subject: [PATCH] factor: apply a more general fix to enable correct assembly In addition to the previous 64 bit guards we've placed in longlong.h there are additional _LP64 guards required for mips with -mcpu >= 3, to avoid a build failure (http://bugs.gnu.org/13353) and on sparc with -mcpu >= v9 in 32 bit mode where for example, `factor 2123123123123123123123` would go into an infinite loop. Since factor.c currently operates on uintmax_t, we restrict the use of the assembly in longlong.h to when 'long' has the same width, to provide a more general guard for this code. * src/factor.c: Restrict the use of longlong.h assembly code, to when the width of intmax_t == long. * src/longlong.h: Remove the previous _LP64 guards to avoid divergence from GMP's longlong.h * NEWS: Adjust the info on build and runtime fixes. --- NEWS | 6 +++--- src/factor.c | 9 ++++++++- src/longlong.h | 16 ++++------------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index 5eb8ef3..754b2cf 100644 --- a/NEWS +++ b/NEWS @@ -29,7 +29,7 @@ GNU coreutils NEWS -*- outline -*- another range. Before, "echo 123|cut --output-delim=: -b2-,3" would print "2:3". Now it prints "23". [bug introduced in 5.3.0] - factor no longer loops infinitely on 32 bit powerpc systems. + factor no longer loops infinitely on 32 bit powerpc or sparc systems. [bug introduced in coreutils-8.20] install -m M SOURCE DEST no longer has a race condition where DEST's @@ -85,8 +85,8 @@ GNU coreutils NEWS -*- outline -*- build failure when building from modified sources, as is common practice for a patched distribution package. - factor now builds on x86_64 with x32 ABI, by avoiding incompatible asm. - [bug introduced in coreutils-8.20] + factor now builds on x86_64 with x32 ABI, 32 bit MIPS, and all HPPA systems, + by avoiding incompatible asm. [bug introduced in coreutils-8.20] A root-only test predicate would always fail. Its job was to determine whether our dummy user, $NON_ROOT_USERNAME, was able to run binaries from diff --git a/src/factor.c b/src/factor.c index 473eee7..95451a5 100644 --- a/src/factor.c +++ b/src/factor.c @@ -118,7 +118,14 @@ #endif #ifndef USE_LONGLONG_H -# define USE_LONGLONG_H 1 +/* With the way we use longlong.h, it's only safe to use + when UWtype = UHWtype, as there were various cases + (as can be seen in the history for longlong.h) where + for example, _LP64 was required to enable W_TYPE_SIZE==64 code, + to avoid compile time or run time issues. */ +# if LONG_MAX == INTMAX_MAX +# define USE_LONGLONG_H 1 +# endif #endif #if USE_LONGLONG_H diff --git a/src/longlong.h b/src/longlong.h index 00aeb73..4681642 100644 --- a/src/longlong.h +++ b/src/longlong.h @@ -678,13 +678,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); /* These macros are for ABI=2.0w. In ABI=2.0n they can't be used, since GCC (3.2) puts longlong into two adjacent 32-bit registers. Presumably this is just a case of no direct support for 2.0n but treating it like 1.0. */ -#if defined (__hppa) && W_TYPE_SIZE == 64 && ! defined (_LONG_LONG_LIMB) \ - && defined (_PA_RISC2_0) && defined (_LP64) -/* Note the _PA_RISC2_0 above is to exclude this code from GCC with - default -march options which doesn't support these instructions. - Also the width check for 'long' is to avoid ILP32 runtimes where - GNU/Linux and narrow HP-UX kernels are known to have issues with - clobbering of context between the add and add,dc instructions. */ +#if defined (__hppa) && W_TYPE_SIZE == 64 && ! defined (_LONG_LONG_LIMB) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add%I5 %5,%r4,%1\n\tadd,dc %r2,%r3,%0" \ : "=r" (sh), "=&r" (sl) \ @@ -1005,9 +999,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); #endif #endif /* 80x86 */ -#if defined (__amd64__) && W_TYPE_SIZE == 64 && defined (_LP64) -/* Note the width check for 'long' is to avoid ILP32 runtimes (x32) - where the ABI is known to be incompatible with the following. */ +#if defined (__amd64__) && W_TYPE_SIZE == 64 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addq %5,%q1\n\tadcq %3,%q0" \ : "=r" (sh), "=&r" (sl) \ @@ -1399,7 +1391,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); /* We should test _IBMR2 here when we add assembly support for the system vendor compilers. */ -#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64 && defined (_LP64) +#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64 #if !defined (_LONG_LONG_LIMB) /* _LONG_LONG_LIMB is ABI=mode32 where adde operates on 32-bit values. So use adde etc only when not _LONG_LONG_LIMB. */ @@ -1752,7 +1744,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); #endif /* udiv_qrnnd */ #endif /* __sparc__ */ -#if (defined (__sparc_v9) || defined (__sparc_v9__)) && W_TYPE_SIZE == 64 +#if defined (__sparc__) && W_TYPE_SIZE == 64 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ( \ "addcc %r4,%5,%1\n" \ -- 1.7.6.4 --------------010400030201060202090703-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 01:17:46 2013 Received: (at 13030) by debbugs.gnu.org; 7 Jan 2013 06:17:47 +0000 Received: from localhost ([127.0.0.1]:33490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts61q-0006nn-EV for submit@debbugs.gnu.org; Mon, 07 Jan 2013 01:17:46 -0500 Received: from mx.meyering.net ([88.168.87.75]:35777) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts61n-0006nb-0v for 13030@debbugs.gnu.org; Mon, 07 Jan 2013 01:17:44 -0500 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 19CB660136; Mon, 7 Jan 2013 07:17:39 +0100 (CET) From: Jim Meyering To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#13030: factor: infinite loop on Linux/powerpc In-Reply-To: <50EA2E48.6030701@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Mon, 07 Jan 2013 02:09:12 +0000") References: <20121129142818.GK21216@riva.dynamic.greenend.org.uk> <50B7B8AB.6040401@draigBrady.com> <86obignqux.fsf@shell.gmplib.org> <50B7C0CB.3030101@draigBrady.com> <50E6EB6A.1050003@draigBrady.com> <50EA2E48.6030701@draigBrady.com> Date: Mon, 07 Jan 2013 07:17:39 +0100 Message-ID: <876239pldo.fsf@rho.meyering.net> Lines: 23 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13030 Cc: 13030@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) P=E1draig Brady wrote: ... > No comments, so I'm pushing the attached. ... > Subject: [PATCH] factor: apply a more general fix to enable correct assem= bly > > In addition to the previous 64 bit guards we've placed in longlong.h > there are additional _LP64 guards required for mips with -mcpu >=3D 3, > to avoid a build failure (http://bugs.gnu.org/13353) and on sparc > with -mcpu >=3D v9 in 32 bit mode where for example, > `factor 2123123123123123123123` would go into an infinite loop. > > Since factor.c currently operates on uintmax_t, we restrict the use > of the assembly in longlong.h to when 'long' has the same width, to > provide a more general guard for this code. > > * src/factor.c: Restrict the use of longlong.h assembly code, > to when the width of intmax_t =3D=3D long. > * src/longlong.h: Remove the previous _LP64 guards to avoid > divergence from GMP's longlong.h > * NEWS: Adjust the info on build and runtime fixes. Nice work. Thanks! From unknown Sat Jun 14 03:57:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Feb 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator