From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12724 invoked by alias); 17 Mar 2011 05:45:59 -0000 Received: (qmail 12707 invoked by uid 22791); 17 Mar 2011 05:45:58 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Mar 2011 05:45:51 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6F13D1B4028; Thu, 17 Mar 2011 05:45:49 +0000 (UTC) From: Mike Frysinger To: "H.J. Lu" Subject: Re: X32 psABI status update Date: Thu, 17 Mar 2011 05:45:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.37.3; KDE/4.6.0; x86_64; ; ) Cc: libc-alpha@sourceware.org, GCC Development , LKML , x32-abi@googlegroups.com References: <201103162257.10440.vapier@gentoo.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1704446.IzFq2RYmyt"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201103170145.46326.vapier@gentoo.org> Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00222.txt.bz2 --nextPart1704446.IzFq2RYmyt Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1853 On Thursday, March 17, 2011 01:21:16 H.J. Lu wrote: > On Wed, Mar 16, 2011 at 7:57 PM, Mike Frysinger wrote: > > ok, took long enough, but that answers most things. your usage of "x32= -" > > prefixed binaries in the documentation seems to imply a lot more than t= he > > fact you just picked those locally to avoid system collisions. this > > isnt a wiki page, otherwise i'd clean things up for you. >=20 > Any suggestion how to create a wiki page for x32? seems like the sites.google.com documentation says it includes wiki support. http://sites.google.com/site/projectwikitemplate_en/ ive never used google sites before, so i dont know how to actually enable i= t=20 on the admin side of things. > > in looking at the gcc files, it doesnt seem like there's any defines > > setup to declare x32 directly. instead, you'd have to do something > > like: #ifdef __x86_64__ > > # if __SIZEOF_LONG__ =3D=3D 8 > > /* x86_64 */ > > # else > > /* x32 */ > > # endif > > #endif > >=20 > > any plans on adding an __x32__ (or whatever) cpp symbol to keep people > > from coming up with their own special/broken crap ? or are there some > > already that i'm not seeing ? >=20 > The idea is in most cases, you only need to check __x86_64__ since x32 and > x86-64 are very close. In some cases, x32 is very different from x86_64, > like assembly codes on long and pointer, you can check __x86_64__ and > __LP64__. In glibc, I used a different approach by using macros REG_RAX, > .., MOV_LP, ADD_LP, SUB_LP and CMP_LP in assembly codes. arm/mips/ppc sets up explicit ABI defines to clearly differentiate between= =20 things. while __LP64__ should work here, it seems like a poor substitute.= =20=20 how about builtin_define("__X32__") ? or __ABI_X32__ ? doesnt seem like i= 386=20 has a standard in this regard to piggy off of. -mike --nextPart1704446.IzFq2RYmyt 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) iQIcBAABAgAGBQJNgaAKAAoJEEFjO5/oN/WBeaUQAJDL6HRSRh3OT884mVHGzzG/ ndVupj9BUnqtPCrwN4XKS/S1wiF1oKQAoulP8MCHTo8FhojjU5/kFiFLnsuuNd2s 8a00IBKavJgSAJv2bYzjJKaZ/sFH5mM77d8SoLZPtQuXnREtTjwhZ3jgKd0SbsIX ltTyGFWkslZefh+5N5T64w0m9UuotHOQViUECmbr9j+3lsAvoISoDv5B6xHoLftX dwFfvQPMV+6rFMZgcLt5214hGHAZ4oN+KUv8Nk+O6/dRENhxt1uTg6mT7uEeTEGu aEM6m56peuzHNM0NJmPkMdDaXamlfCNca75UtHFro8UEBHyXGdErdr2FBHA1QZK9 XSyib7SW4Y5fgU6PcdjSimDmzLErR5EclP66XjVvquVml7+qPAnAMfcrlpJWgvc+ tS9UoVpqOqIAn0ashxx83hZXoM4WAy0L7NjSYWAL/7bJS4Zhl9vRoCdGDoT59JAc mL8u0yfzoKZtGh3RO7LlV00VGgoPpoO7MAur4xeTrrFMh9e9KOcZrP5gr7EGT4Fp 0w4fJd+5p1WUQpIvvDDs7piXlqXJd/VW5cm8b+tTFloNXDjk2vlogRUoqXHuHdfB HyZOiZrU6j4SxKqAG2Ds6R3eFmLtEhP1z+VYBaOxzwG2M/hyJn9k0JAaFyiCBV1A gkU0BdVc++t+Nft7p64X =g7zi -----END PGP SIGNATURE----- --nextPart1704446.IzFq2RYmyt--