From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14603 invoked by alias); 6 May 2013 20:30:27 -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 14592 invoked by uid 89); 6 May 2013 20:30:26 -0000 X-Spam-SWARE-Status: No, score=-9.6 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,TW_EB 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; Mon, 06 May 2013 20:30:25 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 663E633BDD7; Mon, 6 May 2013 20:30:24 +0000 (UTC) From: Mike Frysinger To: Eli Zaretskii Subject: Re: [patch/rfc] gdb: clean up x86 cpuid implementations Date: Mon, 06 May 2013 20:30: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> <831u9jgagk.fsf@gnu.org> In-Reply-To: <831u9jgagk.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2406321.SBlrVclTTN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201305061630.27822.vapier@gentoo.org> X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00150.txt.bz2 --nextPart2406321.SBlrVclTTN Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-length: 1739 On Monday 06 May 2013 15:44:11 Eli Zaretskii wrote: > From: Mike Frysinger > > We've currently got 3 files doing open coded implementations of cpuid. > > Each has its own set of workarounds and varying levels of how well > > they're written and are generally hardcoded to specific cpuid functions. > > If you try to build the latest gdb as a PIE on an i386 system, the build > > will fail because one of them lacks PIC workarounds (wrt ebx). >=20 > Sorry, I don't follow: what workarounds, and why are they needed? with i386 targets, ebx cannot be an output when building as PIC. if you bu= ild=20 gdb as a PIE, the build fails because some of the code in gdb does exactly= =20 that. if you look at the test header, you'll see various other workarounds for=20 different gcc versions and assemblers. > And what's PIE got to do with the go32 target? nothing. it just has its own open-coded implementation of cpuid which i=20 cleaned up to use the new common header. > The current code in go32-nat.c was tested to work in all the > environments supported by that target, without GPFaulting or > triggering any other disasters. I don't think we have the resources > to repeat all that testing with the new code, which tries to detect > newer CPUs, and so could trigger SIGILL. So I'd like to leave > go32-nat.c alone, if possible. on the flip side, if the new common header was tested, go32-nat (and any ot= her=20 DOS like target) wouldn't have to do anymore work, and would be easy to use= =20 cpuid in more places. but in the end, i don't care about dead things like DOS, so if people prefe= r=20 to leave the cruft in that one file, i can look the other way while still=20 cleaning up everything else. -mike --nextPart2406321.SBlrVclTTN 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) iQIcBAABAgAGBQJRiBLjAAoJEEFjO5/oN/WBuMwP/3haVn7HVCy71lbF9IjSLXNT XbBMMkPC8TRLHvKksmuBk5f7OmxScRM7bqMOharO8t4ZUuzsuPZoVOrhM3pQk84h 6G9c5YK7bIoh1rfEIaXD142GhzNP9fjrNzcCe0WhuD0fSbLVtBDHSLNNcQ0q5FZy KAVUj55CwmP0ipd3btWqk5yhxbRN5L4SlRt4kYEYCkXc1ZJtek09h1SfiFgf5b1O 4SbjXo8L+gim+4noQegE7KmBqzxQMN4Ka3uVv8hXCqwa/EtXE0Q2I3u4sp3Od+H5 8b19ILhu/7vdEDIXGBRgUstuJk0nwSrLsYmM33tXqgmH+nXgIE9fCBCVHPnGV/WQ FwiLhhclyRELIeJWlQWvl5g9pImenM93EpDIZwzlhDJntobwgnmRy9KZ+Mu4htP3 QgCjHlswHggUXhYAKRh2pTtWVpn3+X920Eqee1/zROe7Avn7JoSTGSSeemCd9r5+ /4c+Pp08VVM7uDOLvp+gT8mLoDT/uNUaiyz6M1mLsIcwZZvQIlXIFIyRQLdUS1H6 91D6RysmvCwHZfeVwadSuy/Qc4TZA8/Km3Wjj49x/xsZHWEmoF8KHFUOMA3PWKrb Shz2/579UFA03omoE4MsDyGCTVnH5Tdee8NlPzv42fvCJIpK46vm6VGD1dq2mT6d hBVUCtfbnazI6WWVH2t7 =Yv4d -----END PGP SIGNATURE----- --nextPart2406321.SBlrVclTTN--