From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 07 15:44:11 2012 Received: (at submit) by debbugs.gnu.org; 7 Dec 2012 20:44:11 +0000 Received: from localhost ([127.0.0.1]:59311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th4mJ-0003uN-CI for submit@debbugs.gnu.org; Fri, 07 Dec 2012 15:44:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44051) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th4mH-0003uG-9p for submit@debbugs.gnu.org; Fri, 07 Dec 2012 15:44:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th4lu-0005OH-GE for submit@debbugs.gnu.org; Fri, 07 Dec 2012 15:43:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th4lu-0005O7-DT for submit@debbugs.gnu.org; Fri, 07 Dec 2012 15:43:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th4lt-0001lz-G6 for bug-coreutils@gnu.org; Fri, 07 Dec 2012 15:43:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th4lr-0005MY-FL for bug-coreutils@gnu.org; Fri, 07 Dec 2012 15:43:45 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:59707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th4lr-0005MS-9Z for bug-coreutils@gnu.org; Fri, 07 Dec 2012 15:43:43 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9D6FB33DCE3 for ; Fri, 7 Dec 2012 20:43:41 +0000 (UTC) From: Mike Frysinger To: bug-coreutils@gnu.org Subject: [PATCH] factor: disable longlong.h logic for x32 builds Date: Fri, 7 Dec 2012 15:44:18 -0500 Message-Id: <1354913058-833-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.12.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit 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 (----) The current x86_64 asm code does not work for x32 ABIs, so disable it until someone can fix it. Simply deleting the q suffix is not enough. * src/longlong.h: Check for __ILP32__ for x86_64 targets. --- src/longlong.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/longlong.h b/src/longlong.h index f2b2c49..baf001c 100644 --- a/src/longlong.h +++ b/src/longlong.h @@ -1006,7 +1006,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); #endif #endif /* 80x86 */ -#if defined (__amd64__) && W_TYPE_SIZE == 64 +#if defined (__amd64__) && W_TYPE_SIZE == 64 && !defined (__ILP32__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addq %5,%q1\n\tadcq %3,%q0" \ : "=r" (sh), "=&r" (sl) \ -- 1.7.12.4 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 07 15:55:45 2012 Received: (at 13118) by debbugs.gnu.org; 7 Dec 2012 20:55:45 +0000 Received: from localhost ([127.0.0.1]:59323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th4xT-0004B0-Oh for submit@debbugs.gnu.org; Fri, 07 Dec 2012 15:55:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3425) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th4xR-0004Aq-1y for 13118@debbugs.gnu.org; Fri, 07 Dec 2012 15:55:41 -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 qB7KtHlr001855 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Dec 2012 15:55:17 -0500 Received: from [10.36.116.89] (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qB7KtFGh008297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Dec 2012 15:55:17 -0500 Message-ID: <50C257B3.2@draigBrady.com> Date: Fri, 07 Dec 2012 20:55:15 +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: Mike Frysinger Subject: Re: bug#13118: [PATCH] factor: disable longlong.h logic for x32 builds References: <1354913058-833-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1354913058-833-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; 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 qB7KtHlr001855 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13118 Cc: 13118@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: -5.0 (-----) On 12/07/2012 08:44 PM, Mike Frysinger wrote: > The current x86_64 asm code does not work for x32 ABIs, so disable it > until someone can fix it. Simply deleting the q suffix is not enough. > > * src/longlong.h: Check for __ILP32__ for x86_64 targets. > --- > src/longlong.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/longlong.h b/src/longlong.h > index f2b2c49..baf001c 100644 > --- a/src/longlong.h > +++ b/src/longlong.h > @@ -1006,7 +1006,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype= , UWtype, UWtype); > #endif > #endif /* 80x86 */ > > -#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 64 > +#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 64 && !defined (__ILP32_= _) > #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ > __asm__ ("addq %5,%q1\n\tadcq %3,%q0" \ > : "=3Dr" (sh), "=3D&r" (sl) \ > I think we may go for something more general here, as we're having all sorts of problems in this area. http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dhistory;f=3Dsrc/longl= ong.h It seems that we need _LP64 defined, to enable W_TYPE_SIZE =3D=3D 64 code safely. thanks, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 19 21:30:03 2012 Received: (at 13118-done) by debbugs.gnu.org; 20 Dec 2012 02:30:03 +0000 Received: from localhost ([127.0.0.1]:51437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlVta-0006bj-UG for submit@debbugs.gnu.org; Wed, 19 Dec 2012 21:30:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8742) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlVtY-0006at-Lt for 13118-done@debbugs.gnu.org; Wed, 19 Dec 2012 21:30:02 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBK2TsYj004980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Dec 2012 21:29:54 -0500 Received: from [10.36.116.75] (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBK2TpWO001505 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 19 Dec 2012 21:29:53 -0500 Message-ID: <50D2781E.2050708@draigBrady.com> Date: Thu, 20 Dec 2012 02:29:50 +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: Mike Frysinger Subject: Re: bug#13118: [PATCH] factor: disable longlong.h logic for x32 builds References: <1354913058-833-1-git-send-email-vapier@gentoo.org> <50C257B3.2@draigBrady.com> In-Reply-To: <50C257B3.2@draigBrady.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id qBK2TsYj004980 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13118-done Cc: 13118-done@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: -5.0 (-----) On 12/07/2012 08:55 PM, P=E1draig Brady wrote: > On 12/07/2012 08:44 PM, Mike Frysinger wrote: >> The current x86_64 asm code does not work for x32 ABIs, so disable it >> until someone can fix it. Simply deleting the q suffix is not enough. >> >> * src/longlong.h: Check for __ILP32__ for x86_64 targets. >> --- >> src/longlong.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/longlong.h b/src/longlong.h >> index f2b2c49..baf001c 100644 >> --- a/src/longlong.h >> +++ b/src/longlong.h >> @@ -1006,7 +1006,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtyp= e, UWtype, UWtype); >> #endif >> #endif /* 80x86 */ >> >> -#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 64 >> +#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 64 && !defined (__ILP32= __) >> #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ >> __asm__ ("addq %5,%q1\n\tadcq %3,%q0" \ >> : "=3Dr" (sh), "=3D&r" (sl) \ >> > > I think we may go for something more general here, > as we're having all sorts of problems in this area. > http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dhistory;f=3Dsrc/lon= glong.h > > It seems that we need _LP64 defined, > to enable W_TYPE_SIZE =3D=3D 64 code safely. I've not come up with anything more generic for the moment, so will go with this slightly adjusted patch for now. Was this a runtime or build time issue BTW? What was the failure mode if runtime? thanks, P=E1draig. commit 2178e2ad8dce68862ea9545328aae999700c54cc Author: Mike Frysinger Date: Fri Dec 7 15:44:18 2012 -0500 factor: disable x86_64 assembly code for x32 builds The current x86_64 asm code does not work for x32 (__ILP32__) ABIs, so disable it. Note simply deleting the q suffix is not enough. * src/longlong.h: Restrict x86_64 assembly to _LP64 targets, which is consistent with other checks in longlong.h and avoids this code on x32. diff --git a/src/longlong.h b/src/longlong.h index f2b2c49..1792045 100644 --- a/src/longlong.h +++ b/src/longlong.h @@ -683,7 +683,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UW= type, UWtype); && 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 + 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. */ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ @@ -1006,7 +1006,9 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, = UWtype, UWtype); #endif #endif /* 80x86 */ -#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 64 +#if defined (__amd64__) && W_TYPE_SIZE =3D=3D 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. */ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addq %5,%q1\n\tadcq %3,%q0" = \ : "=3Dr" (sh), "=3D&r" (sl) = \ From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 19 21:31:21 2012 Received: (at 13118-done) by debbugs.gnu.org; 20 Dec 2012 02:31:21 +0000 Received: from localhost ([127.0.0.1]:51445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlVur-0006eP-Il for submit@debbugs.gnu.org; Wed, 19 Dec 2012 21:31:21 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:36496) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlVup-0006eI-9i for 13118-done@debbugs.gnu.org; Wed, 19 Dec 2012 21:31:20 -0500 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9D7F7335E2B; Thu, 20 Dec 2012 02:31:13 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: =?iso-8859-1?q?P=E1draig_Brady?= Subject: Re: bug#13118: [PATCH] factor: disable longlong.h logic for x32 builds Date: Wed, 19 Dec 2012 21:31:13 -0500 User-Agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) References: <1354913058-833-1-git-send-email-vapier@gentoo.org> <50C257B3.2@draigBrady.com> <50D2781E.2050708@draigBrady.com> In-Reply-To: <50D2781E.2050708@draigBrady.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7413271.Iu3DE44de9"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201212192131.14588.vapier@gentoo.org> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13118-done Cc: 13118-done@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: -4.2 (----) --nextPart7413271.Iu3DE44de9 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Wednesday 19 December 2012 21:29:50 P=E1draig Brady wrote: > Was this a runtime or build time issue BTW? > What was the failure mode if runtime? build time. the asm code was rejected due to mismatched constraints. =2Dmike --nextPart7413271.Iu3DE44de9 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQ0nhyAAoJEEFjO5/oN/WBuV0QALC6NYP8i7YhpOKbxyywcx9S heDt/zZYBauRMMf2Mf5MquZc2O4+BoqdPf2lSlhIV5jRWelmHmR0ITdELE4N2cBS gGPPpqnfkUnxEafO/FJpz3x9UHrzLpdPA7g/UIZHD2SvFLIH5O0lUtqOsT1UjOQa jCyo/H3kxe41KYrqN0bq02ahc5xgdfU8w30fqa25ixOxxdwEvz2LuyRsn5/fsS8j IiSdYZ/DTxpvwiWkX/wKPQ/jDEe6H0+Ff4ryqEpzNp6LyWwvET7j1VDIzUfcwqDt l+n0pZ74oDS9/27VVii3Qpa8VDAU9kaBWMn5bzGAuak+KlBx8/ADk43rJz1fLiLr QjScSTT3U2jb3RrkJ1RptOkAuunMtY4pVERW/nsNWU9Q+9Vnu2NPNG9hqMYzCdz5 D78JrH26XoaQqv87z/7CRGCIh5VrX3ywsLzcsz4a6OOtfuOaTKMFW3R41xpCi2cc egEhI3PFfg/jxIBc1pklxNlkF3CZh4LS4Jgpj0X3MajB2l3XbM3YOpw2QLiHXMAJ Kh6dmBRnARmFlxocB7PAGm0VkjjMiuHUvPAwCNA1MZIdhwbcbTXnqv6jtVs7Nbqy nUi4vtMvphJjNjYxxpJFqmRu0dEt7UwnbzjfEi08hoVx5CFiSD+Pj3BRiBLjSiGK mqJA1BWWOhxZ5DzegJmg =VlTS -----END PGP SIGNATURE----- --nextPart7413271.Iu3DE44de9-- From unknown Mon Aug 18 17:58:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Jan 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