RE: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones

2012-06-11 Thread Lu, Hongjiu
-devel@lists.x.org; Lu, Hongjiu Subject: Re: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones On 06/ 6/12 11:49 AM, Sergei Trofimovich wrote: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4 And I still maintain that if it defines __amd64__ in a non-LP64 environment

RE: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones

2012-06-11 Thread Lu, Hongjiu
On 06/10/12 09:22 AM, Lu, Hongjiu wrote: We are proposing to extend x86-64 psABI to support ILP32 model: http://gcc.gnu.org/ml/gcc/2012-05/msg00258.html If a software package needs update to support ILP32 in x86-64, __ILP32__ can used to distinguish LP64 model from ILP32 model

RE: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones

2012-06-11 Thread Lu, Hongjiu
On 06/10/12 11:04 AM, Lu, Hongjiu wrote: On 06/10/12 09:22 AM, Lu, Hongjiu wrote: We are proposing to extend x86-64 psABI to support ILP32 model: http://gcc.gnu.org/ml/gcc/2012-05/msg00258.html If a software package needs update to support ILP32 in x86-64, __ILP32__ can used

RE: RE: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones

2012-06-11 Thread Lu, Hongjiu
On Sun, 10 Jun 2012 18:10:56 +, Lu, Hongjiu hongjiu...@intel.com wrote: This patch is proof that redefining __amd64__ breaks existing software, forcing us to go around adding new changes to avoid damage.It's not adding the __ILP32__ check that breaks things, it's forcing all

RE: RE: RE: [PATCH v2] Xmd.h: Treat __ILP32__ targets as LONG32 ones

2012-06-11 Thread Lu, Hongjiu
On Mon, 11 Jun 2012 13:04:20 +, Lu, Hongjiu hongjiu...@intel.com wrote: If a software checks __amd64__, it is likely that it won't compile correctly for -mx32, no matter if -mx32 defines __amd64__ or not. In this senses, this software is broken for -mx32. Yes, this package needs

RE: [xproto: PATCH] Xmd.h: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4

2011-12-28 Thread Lu, Hongjiu
Cc: Lu, Hongjiu; xorg-devel@lists.x.org Subject: Re: [xproto: PATCH] Xmd.h: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4 On 12/21/11 09:24, Sergei Trofimovich wrote: What do you think of changing predefined __amd64__ define in gcc to something distinct? If it's

RE: [xproto: PATCH] Xmd.h: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4

2011-12-28 Thread Lu, Hongjiu
On 12/28/11 06:34, Lu, Hongjiu wrote: __AMD64__ is defined when 64bit x86 instruction set is used, which is true for x32. The difference is x32 doesn't define __LP64__. Then you have explictly designed your ABI to break existing software, and it is broken by design and should

RE: [xproto: PATCH] Xmd.h: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4

2011-12-28 Thread Lu, Hongjiu
From: Lu, Hongjiu hongjiu...@intel.com Date: Wed, 28 Dec 2011 14:34:09 + __AMD64__ is defined when 64bit x86 instruction set is used, which is true for x32. The difference is x32 doesn't define __LP64__. Chapter 7, Development Environment, of the AMD64 ABI (the non-x32