From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20330 invoked by alias); 30 Mar 2011 07:57:29 -0000 Received: (qmail 20321 invoked by uid 22791); 30 Mar 2011 07:57:28 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-px0-f176.google.com (HELO mail-px0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Mar 2011 07:57:24 +0000 Received: by pxi11 with SMTP id 11so187828pxi.21 for ; Wed, 30 Mar 2011 00:57:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.154.12 with SMTP id b12mr671341wfe.160.1301471843660; Wed, 30 Mar 2011 00:57:23 -0700 (PDT) Received: by 10.142.253.16 with HTTP; Wed, 30 Mar 2011 00:57:23 -0700 (PDT) In-Reply-To: <371569CBCFB2E745B891DBB88B2DFDDD1A22BB908B@KCINPUNHJCMS01.kpit.com> References: <371569CBCFB2E745B891DBB88B2DFDDD1A229C5E3A@KCINPUNHJCMS01.kpit.com> <371569CBCFB2E745B891DBB88B2DFDDD1A22BB908B@KCINPUNHJCMS01.kpit.com> Date: Wed, 30 Mar 2011 13:37:00 -0000 Message-ID: Subject: Re: Supporting multiple pointer sizes in GCC From: Claudiu Zissulescu To: "Jayant R. Sonar" Cc: Paul Koning , DJ Delorie , "gcc@gcc.gnu.org" 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/msg00498.txt.bz2 Hi, I would try using the named address space for your issue (see TARGET_ADDR_SPACE_POINTER_MODE). Please check the SPU target for an implementation example. Regards, Claudiu On Mon, Mar 28, 2011 at 2:14 PM, Jayant R. Sonar wrote: >>? =A0MIPS has two pointer sizes, but a given compilation (gcc >> invocation) uses only one of them, it comes from the chosen ABI. > > Yes, it looks like MIPS have got 2 ABIs - 32bit and 64bit. The choice > of the ABI is controlled through a command line option '-march=3Darch'. > Therefore in MIPS it doesn't look possible to have 2 pointers of > different sizes existing simultaneously inside a single executable. > > Whereas, what I am looking forward to do is adding some target > specific data attributes, say data16 and data32. In a simple test case > I should be able to declare two different pointer variables using these > attributes as following: > > char * ptrABC __attribute__ (data16); > char * ptrXYZ __attribute__ (data32); > > The size of ptrABC should be 16bits and that of ptrXYZ should > be 32bits. > > Will it be possible to do something like this in GCC? > > Regards, > Jayant > > > -----Original Message----- > From: Paul Koning [mailto:paul_koning@dell.com] > Sent: Friday, March 25, 2011 11:20 PM > To: DJ Delorie > Cc: Jayant R. Sonar; gcc@gcc.gnu.org > Subject: Re: Supporting multiple pointer sizes in GCC > > > On Mar 25, 2011, at 1:37 PM, DJ Delorie wrote: > >> >> "Jayant R. Sonar" writes: >>> Is it possible to support multiple pointer sizes (e.g. 16bit, 32bit) >>> which can co-exist in single compilation unit? >>> Whether it is supported in GCC now? >>> Is there any other architecture which has this feature already >>> implemented? >> >> Yes, there are three that I know of - mips64, s390 (tpf), and m32c. > > ? =A0MIPS has two pointer sizes, but a given compilation (gcc invocation)= uses only one of them, it comes from the chosen ABI. > > =A0 =A0 =A0 =A0paul > > >