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 <jayant.so...@kpitcummins.com> wrote: >>? MIPS 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=arch'. > 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_kon...@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" <jayant.so...@kpitcummins.com> 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. > > ? MIPS has two pointer sizes, but a given compilation (gcc invocation) uses > only one of them, it comes from the chosen ABI. > > paul > > >