From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24533 invoked by alias); 21 Mar 2011 10:52:12 -0000 Received: (qmail 24515 invoked by uid 22791); 21 Mar 2011 10:52:10 -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-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Mar 2011 10:52:06 +0000 Received: by iwn10 with SMTP id 10so7616831iwn.20 for ; Mon, 21 Mar 2011 03:52:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.74.194 with SMTP id x2mr288056icj.113.1300704724334; Mon, 21 Mar 2011 03:52:04 -0700 (PDT) Received: by 10.43.135.9 with HTTP; Mon, 21 Mar 2011 03:52:04 -0700 (PDT) In-Reply-To: References: <201103210108.49780.vapier@gentoo.org> <201103210153.10145.vapier@gentoo.org> Date: Mon, 21 Mar 2011 10:52:00 -0000 Message-ID: Subject: Re: X32 psABI status update From: "H.J. Lu" To: Michael Matz Cc: Mike Frysinger , 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/msg00304.txt.bz2 On Mon, Mar 21, 2011 at 1:20 AM, Michael Matz wrote: > Hi, > > On Sun, 20 Mar 2011, H.J. Lu wrote: > >> I don't think it will help x32 and I think it will make it harder to add >> x32 support. I still want to see a real usage before I add it. > > % cat real-world.c > /* intptr_t; what's that? */ > union space_saving_htab_element { > =A0void *generic_pointer; > =A0/* Usually we need a long for a pointer, but I just figured out > =A0 =A0 that on x32 an int is enough and smaller. =A0My program > =A0 =A0 now needs half as much memory, supi! =A0*/ > #ifdef __x32__ > =A0unsigned int as_number; > #else > =A0unsigned long as_number; > #endif > }; That is the wrong way to support x32. You should remove "#ifdef __x32__", which only shows __x32__ shouldn't be used/needed. > > Ciao, > Michael. > PS: Of course you and I wouldn't write such code, but Mikes point was that > there might be some that do. =A0I could probably construct an example whe= re > it would matter for real involving inline asm that for some reason has to > slightly differ depending on x32-ness. > I am still waiting for a real example. --=20 H.J.