public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Add _ILP32 and __ILP32__ for X32 programming model
@ 2012-04-13 17:07 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2012-04-13 17:07 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: x32-abi, GCC Development, GNU C Library

On Fri, Apr 13, 2012 at 9:44 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Apr 13, 2012 at 9:40 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>> On 04/13/2012 09:18 AM, H.J. Lu wrote:
>>> Hi,
>>>
>>> We need a reliable way to tell if we are compiling for x32 through
>>> pre-defined preprocessor symbol.  __LP64/__LP64__ aren't
>>> specified by x86-64 psABI, although they have been added to
>>> GCC 3.3.  They can't be counted on to detect x32 since not x86-64
>>> compilers define them.   I updated x32 psABI:
>>>
>>> https://sites.google.com/site/x32abi/documents
>>>
>>> to define __ILP32 and __ILP32__ for X32 programming model.  I
>>> will submit a patch for GCC trunk and 4.7 branch.
>>>
>>
>> Can we add __LP64__ to the psABI too?
>>
>
> X32 psABI has
>
> __amd64        Defined for both LP64 and X32 programming models.
> __amd64__     Defined for both LP64 and X32 programming models.
> __x86_64        Defined for both LP64 and X32 programming models.
> __x86_64__    Defined for both LP64 and X32 programming models.
> __LP64           Defined for LP64 programming model.
> __LP64__       Defined for LP64 programming model.
> __ILP32          Defined for X32 programming model.
> __ILP32__      Defined for X32 programming model.
>
>

It should be _LP64/_ILP32, not __LP64 and __ILP32.  I updated x32
psABI.

-- 
H.J.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-13 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 17:07 Add _ILP32 and __ILP32__ for X32 programming model H.J. Lu

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).