From 31ee5761b71a65beb449de24e8f5fa6f93c0b640 Mon Sep 17 00:00:00 2001 From: aoliva Date: Thu, 3 May 2001 11:58:43 +0000 Subject: Re-installed 2001-01-09's patch: * hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long if it's wider than long and the target's long is wider than the host's. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41785 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/hwint.h | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a1418e8b348..794cb1f6af0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-05-03 Alexandre Oliva + + Re-installed 2001-01-09's patch: + * hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long + if it's wider than long and the target's long is wider than the + host's. + 2001-05-02 David O'Brien * config.gcc, config/rs6000/aix51.h, config/rs6000/mach.h: Do not diff --git a/gcc/hwint.h b/gcc/hwint.h index e4ec51cba7a..9551dc5ccd9 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -27,6 +27,29 @@ /* Find the largest host integer type and set its size and type. */ +/* Use long long on the host if the target has a wider long type than + the host. */ + +#if ! defined HOST_BITS_PER_WIDE_INT \ + && defined HOST_BITS_PER_LONGLONG \ + && (HOST_BITS_PER_LONGLONG > HOST_BITS_PER_LONG) \ + && (defined (LONG_LONG_MAX) || defined (LONGLONG_MAX) \ + || defined (LLONG_MAX) || defined (__GNUC__)) + +# ifdef MAX_LONG_TYPE_SIZE +# if MAX_LONG_TYPE_SIZE > HOST_BITS_PER_LONG +# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG +# define HOST_WIDE_INT long long +# endif +# else +# if LONG_TYPE_SIZE > HOST_BITS_PER_LONG +# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG +# define HOST_WIDE_INT long long +# endif +# endif + +#endif + #ifndef HOST_BITS_PER_WIDE_INT # if HOST_BITS_PER_LONG > HOST_BITS_PER_INT -- cgit v1.2.1