From: "Jayant R. Sonar" <Jayant.Sonar@kpitcummins.com>
To: Paul Koning <paul_koning@dell.com>, DJ Delorie <dj@redhat.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: RE: Supporting multiple pointer sizes in GCC
Date: Mon, 28 Mar 2011 12:27:00 -0000 [thread overview]
Message-ID: <371569CBCFB2E745B891DBB88B2DFDDD1A22BB908B@KCINPUNHJCMS01.kpit.com> (raw)
In-Reply-To: <CD27D93D-A22C-4926-B328-F80E83827FF5@dell.com>
>? 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_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" <Jayant.Sonar@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
next prev parent reply other threads:[~2011-03-28 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 12:33 Jayant R. Sonar
2011-03-25 17:39 ` DJ Delorie
2011-03-25 17:53 ` Paul Koning
2011-03-25 18:51 ` DJ Delorie
2011-03-28 12:27 ` Jayant R. Sonar [this message]
2011-03-30 13:37 ` Claudiu Zissulescu
2011-03-31 13:45 ` Paulo J. Matos
2011-04-21 22:21 ` Michael Meissner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=371569CBCFB2E745B891DBB88B2DFDDD1A22BB908B@KCINPUNHJCMS01.kpit.com \
--to=jayant.sonar@kpitcummins.com \
--cc=dj@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=paul_koning@dell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).