From a62ebd66639a6845ca6354e2c9eff76e00af9865 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 15 Dec 2017 11:31:42 +0000 Subject: PR target/66488 * ggc-page.c (HOST_BITS_PER_PTR): Do not define here... * hwint.h (HOST_BITS_PER_PTR): ...but here instead. * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255688 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/xm-mingw32.h | 5 ----- gcc/ggc-page.c | 5 ----- gcc/hwint.h | 1 + 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64a27c14dff..dd7b0266516 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-12-15 Eric Botcazou + + PR target/66488 + * ggc-page.c (HOST_BITS_PER_PTR): Do not define here... + * hwint.h (HOST_BITS_PER_PTR): ...but here instead. + * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete. + 2017-12-15 Richard Biener Backport from mainline diff --git a/gcc/config/i386/xm-mingw32.h b/gcc/config/i386/xm-mingw32.h index 6eb3a626f0c..d4d63f58322 100644 --- a/gcc/config/i386/xm-mingw32.h +++ b/gcc/config/i386/xm-mingw32.h @@ -37,8 +37,3 @@ along with GCC; see the file COPYING3. If not see "long long" values. Instead, we use "I64". */ #define HOST_LONG_LONG_FORMAT "I64" #endif - -/* this is to prevent gcc-heap.c from assuming sizeof(long) == sizeof(intptr_t) */ -#ifdef __x86_64__ -# define HOST_BITS_PER_PTR 64 -#endif diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 1aef94ec91f..da994c2faea 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -92,11 +92,6 @@ along with GCC; see the file COPYING3. If not see 4: Object marks as well. */ #define GGC_DEBUG_LEVEL (0) -#ifndef HOST_BITS_PER_PTR -#define HOST_BITS_PER_PTR HOST_BITS_PER_LONG -#endif - - /* A two-level tree is used to look up the page-entry for a given pointer. Two chunks of the pointer's bits are extracted to index the first and second levels of the tree, as follows: diff --git a/gcc/hwint.h b/gcc/hwint.h index 2a61e3c9be6..e5fa33fc602 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -14,6 +14,7 @@ #define HOST_BITS_PER_SHORT (CHAR_BIT * SIZEOF_SHORT) #define HOST_BITS_PER_INT (CHAR_BIT * SIZEOF_INT) #define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG) +#define HOST_BITS_PER_PTR (CHAR_BIT * SIZEOF_VOID_P) /* The string that should be inserted into a printf style format to indicate a "long" operand. */ -- cgit v1.2.1