From f5b39f907f7a2d53a9506fdeafb99078315531eb Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 15 Dec 2017 11:30:56 +0000 Subject: re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory usage) 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. From-SVN: r255687 --- 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 453aa70..3ae3a32 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 Julia Koval * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi, diff --git a/gcc/config/i386/xm-mingw32.h b/gcc/config/i386/xm-mingw32.h index 6eb3a62..d4d63f5 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 5f79e32..854d310 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 2a61e3c..e5fa33f 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.1