Patchwork [x32] PATCH: Check TARGET_LP64 for SIZE_TYPE and PTRDIFF_TYPE

login
register
mail settings
Submitter H.J. Lu
Date May 20, 2011, 3:45 a.m.
Message ID <20110520034506.GA13884@intel.com>
Download mbox | patch
Permalink /patch/96522/
State New
Headers show

Comments

H.J. Lu - May 20, 2011, 3:45 a.m.
Hi,

I will check in this patch to check TARGET_LP64, instead of
TARGET_64BIT, for SIZE_TYPE and PTRDIFF_TYPE.

H.J.
---
commit 4a3039882737da539adc84287d0e1ffa49a8ba62
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu May 19 20:22:15 2011 -0700

    Check TARGET_LP64 for SIZE_TYPE and PTRDIFF_TYPE.

Patch

diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index b5bc33a..227b377 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,3 +1,9 @@ 
+2011-05-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/i386/x86-64.h (SIZE_TYPE): Check TARGET_LP64 instead
+	of TARGET_64BIT.
+	(PTRDIFF_TYPE): Likewise.
+
 2011-05-17  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* config/i386/i386.md (*call_vzeroupper): Disabled for TARGET_X32.
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"