From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5097 invoked by alias); 17 Mar 2011 14:43:58 -0000 Received: (qmail 5079 invoked by uid 22791); 17 Mar 2011 14:43:57 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Mar 2011 14:43:52 +0000 Received: by iyb26 with SMTP id 26so3031983iyb.20 for ; Thu, 17 Mar 2011 07:43:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.141.196 with SMTP id p4mr2070068icu.180.1300373030370; Thu, 17 Mar 2011 07:43:50 -0700 (PDT) Received: by 10.43.135.9 with HTTP; Thu, 17 Mar 2011 07:43:50 -0700 (PDT) In-Reply-To: <201103170145.46326.vapier@gentoo.org> References: <201103162257.10440.vapier@gentoo.org> <201103170145.46326.vapier@gentoo.org> Date: Thu, 17 Mar 2011 14:43:00 -0000 Message-ID: Subject: Re: X32 psABI status update From: "H.J. Lu" To: Mike Frysinger Cc: libc-alpha@sourceware.org, GCC Development , LKML , x32-abi@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00226.txt.bz2 On Wed, Mar 16, 2011 at 10:45 PM, Mike Frysinger wrote: > On Thursday, March 17, 2011 01:21:16 H.J. Lu wrote: >> On Wed, Mar 16, 2011 at 7:57 PM, Mike Frysinger wrot= e: >> > ok, took long enough, but that answers most things. =A0your usage of "= x32-" >> > prefixed binaries in the documentation seems to imply a lot more than = the >> > fact you just picked those locally to avoid system collisions. =A0this >> > isnt a wiki page, otherwise i'd clean things up for you. >> >> Any suggestion how to create a wiki page for x32? > > seems like the sites.google.com documentation says it includes wiki suppo= rt. > =A0 =A0 =A0 =A0http://sites.google.com/site/projectwikitemplate_en/ > > ive never used google sites before, so i dont know how to actually enable= it > on the admin side of things. I will take a look. >> > in looking at the gcc files, it doesnt seem like there's any defines >> > setup to declare x32 directly. =A0instead, you'd have to do something >> > like: #ifdef __x86_64__ >> > # if __SIZEOF_LONG__ =3D=3D 8 >> > /* x86_64 */ >> > # else >> > /* x32 */ >> > # endif >> > #endif >> > >> > any plans on adding an __x32__ (or whatever) cpp symbol to keep people >> > from coming up with their own special/broken crap ? =A0or are there so= me >> > already that i'm not seeing ? >> >> The idea is in most cases, you only need to check __x86_64__ since x32 a= nd >> x86-64 are very close. =A0In 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 > things. =A0while __LP64__ should work here, it seems like a poor substitu= te. > how about builtin_define("__X32__") ? =A0or __ABI_X32__ ? =A0doesnt seem = like i386 > has a standard in this regard to piggy off of. If you can show me some real examples how __x32__ will be used, I will take a look. Thanks. --=20 H.J.