This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, AArch64, ILP32] 5/5 Define _ILP32 and __ILP32__


On 06/27/13 20:28, Joseph S. Myers wrote:
On Thu, 27 Jun 2013, Yufeng Zhang wrote:

We need a reliable way to tell we are compiling for ILP32.  On one hand LLP64
support may be added in the future; on the other hand, not all AArch64

If thinking of adding a third ABI, that suggests you should be using
something along the lines of _MIPS_SIM - a macro that's always defined,
with an integer value depending on the ABI in used.

compilers may define _LP64 and __LP64__.

Why should all such compilers define the ILP32 macros, but not all define
the LP64 macros?  Do you have an AArch64 equivalent of the ACLE that
specifies such things?

There will be ACLE for AArch64 and it is in the view that both macros will be specified.

Since a few other ports that support ILP32 have already defined these macros, it shall help the code porting with them defined for AArch64 as well.

Other ports like x86_64, ia64-hpux and pa-hpux also define one or both.

If multiple ports define something, that might be an indication for
defining it in target-independent code (like _LP64) rather than repeating
it for more targets.

I can propose a patch later to have _ILP32 and __ILP32__ defined in the target-independent code instead and see if the community like it?

Thanks,
Yufeng


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]