From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2107 invoked by alias); 7 May 2013 14:31:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2093 invoked by uid 89); 7 May 2013 14:31:13 -0000 X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 14:31:12 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B7D2F33DC2C; Tue, 7 May 2013 14:31:10 +0000 (UTC) From: Mike Frysinger To: Pedro Alves Subject: Re: [PATCH v2] gdb: clean up x86 cpuid implementations Date: Tue, 07 May 2013 14:31:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.8.3; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201305061451.24861.vapier@gentoo.org> <51890AC5.2080109@redhat.com> <51890D5A.4080400@redhat.com> In-Reply-To: <51890D5A.4080400@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5108536.1IK7HVsoUQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201305071031.12413.vapier@gentoo.org> X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00225.txt.bz2 --nextPart5108536.1IK7HVsoUQ Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1499 On Tuesday 07 May 2013 10:19:06 Pedro Alves wrote: > On 05/07/2013 03:08 PM, Pedro Alves wrote: > > On 05/07/2013 02:29 PM, Mike Frysinger wrote: > >> Fortunately, that last header there is pretty damn good -- it handles > >> lots of edge cases, the code is nice & tight (uses gcc asm operands > >> rather than manual movs), and is already almost a general library type > >> header. > >=20 > > The top of the header says: > >=20 > > /* Helper file for i386 platform. Runtime check for MMX/SSE/SSE2/AVX > > * support. Copied from gcc 4.4. > >=20 > > I'd rather not fork the gcc file. If we need to wrap its > > functions/macros for gdb's purpose, I'd rather do that in a separate > > file that > > #includes (a copy of) gcc's, verbatim, so we can pull updates from > > upstream easily. In fact, diffing our copy against gcc's shows we're > > already out of date --- see below. The bits removed are gdb-specific > > additions. > >=20 > > I wonder whether pushing the file down to libiberty, so both gcc > > and gdb could share it would be viable? >=20 > Actually, it seems like __get_cpuid is a gcc built-in nowadays, but I don= 't > when it was added. We could make use of it, and only fallback to the > header copy if the host compiler doesn't have the builtin. yes, gcc introduced a cpuid.h starting with gcc-4.3.0. i wanted to focus o= n=20 getting everyone on the same header first before tackling that. i didn't t= hink=20 people would be ok with x86 builds requiring gcc-4.3.0 ? -mike --nextPart5108536.1IK7HVsoUQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRiRAwAAoJEEFjO5/oN/WBaUgP/iQX0aw4yt/2RZWJVlFzdmMq gWDCOTbBrVfMYRWuLWmI4ItVnUScE085HJr5Y6it5ZRmcP7oA+0X9HoRWlOBSlV+ ldphjstIM3pWGUzx2FW6lgzw4ACS+nOnMU/O7VbNqxClfwPUI3iF325Cjm9Y+9f0 mYtL01mEpCY5Ucp4i8+bOiPhPPVrWwNeJDQpTPgqOof0Cye6v8CpOUnVrN3jbirK UrUp0ghLVlOEOtVEmTk48kk5LqF88tFWO8rnkejoAgfbgyDo3mlqIeUXvPtC8g1W 6CaF3bkU4TZTj4gSCRIfSLfuUS/gVmGl/DLcb5assxiCzMmUGrslazXBllorEkFu XVDmiGiw5BDT9jGHCfeudXh0vVl3FKr+1vxgs8qWOYTlnaKrToptROWosqN+ICrw 5Z9OnB6/bA5uT5YZjBmRv73cCR37AJweXP9jEMKINH77ek53eGf5cvrYbH4ezZ2U mD59TROUq7t5IQfrmeEP1TVxbQzoynxFDPDuQ1fK9E49B3TNxKzMraDLpXWY53n8 M+HekdpAKAkuW1Rmv5rgKwi9f7aSvaCK+OvGJqooQNgRtTTZLxIEMgYwZbj6So3x /wPPAgMnBLulwn+UzrYJBNtMzwuCB5vqf8C2GP8GoGZ2PEAT55/AywsyaduKvyfq KFV2cuZCuNz2I6f8+G1u =J279 -----END PGP SIGNATURE----- --nextPart5108536.1IK7HVsoUQ--