diff mbox

PATCH: [x32]: Check TARGET_LP64 for SIZE_TYPE/PTRDIFF_TYPE

Message ID 20110729224108.GA31295@intel.com
State New
Headers show

Commit Message

H.J. Lu July 29, 2011, 10:41 p.m. UTC
Hi,

X32 is 32bit.  This patch checks TARGET_LP64 for SIZE_TYPE/PTRDIFF_TYPE.
OK for trunk?

Thanks.


H.J.
---
2011-07-29  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/x86-64.h (SIZE_TYPE): Check TARGET_LP64 instead
	of TARGET_64BIT.
	(PTRDIFF_TYPE): Likewise.

Comments

Uros Bizjak July 30, 2011, 5:15 p.m. UTC | #1
On Sat, Jul 30, 2011 at 12:41 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:

> X32 is 32bit.  This patch checks TARGET_LP64 for SIZE_TYPE/PTRDIFF_TYPE.
> OK for trunk?

OK, if tested on x32. You didn't say how the patch was tested.

Thanks,
Uros.
H.J. Lu July 31, 2011, 6:11 p.m. UTC | #2
On Sat, Jul 30, 2011 at 10:15 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sat, Jul 30, 2011 at 12:41 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>
>> X32 is 32bit.  This patch checks TARGET_LP64 for SIZE_TYPE/PTRDIFF_TYPE.
>> OK for trunk?
>
> OK, if tested on x32. You didn't say how the patch was tested.
>

Checked in. I should have mentioned that it was tested on x32.
diff mbox

Patch

diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h
index b85dab9..d20f326 100644
--- a/gcc/config/i386/x86-64.h
+++ b/gcc/config/i386/x86-64.h
@@ -38,10 +38,10 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define MCOUNT_NAME "mcount"
 
 #undef SIZE_TYPE
-#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
+#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "unsigned int")
 
 #undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
+#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "int")
 
 #undef WCHAR_TYPE
 #define WCHAR_TYPE "int"