This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 32->64 bit cross compilers
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: 32->64 bit cross compilers
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 26 Apr 2001 03:30:54 -0300
- Cc: janis at us dot ibm dot com, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <OF5C12C670.94123028-ON88256A39.005FFDD9@LocalDomain><orlmoo6c7y.fsf@guarana.lsd.ic.unicamp.br><20010425115754D.mitchell@codesourcery.com>
On Apr 25, 2001, Mark Mitchell <mark@codesourcery.com> wrote:
>>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
Alexandre> I don't think so. It's an ugly hack, and one that
Alexandre> shouldn't ever be installed. I've already submitted a
Alexandre> cleaner approach, that revealed bugs at that time, but
Alexandre> I've finally fixed those bugs, so maybe it's time to
Alexandre> try installing the patch again?
> Would you please repost and retest a current patch, or ask for a
> volunteer to do the testing for you, if you don't have an rs6000 box
> that runs quickly?
Actually, I've tested the effects of the patch a few days ago,
building ppc-eabi on an alpha box, when I was testing the CONST_INT
sign-extension patches.
Here's the patch, again. Ok to install?
Note that it only makes sense to install it in mainline, since the
CONST_INT sign-extension patches that get it to work are not in the
3.0 branch.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
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.
Index: gcc/hwint.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/hwint.h,v
retrieving revision 1.6
diff -u -p -r1.6 hwint.h
--- gcc/hwint.h 2001/03/14 00:58:24 1.6
+++ gcc/hwint.h 2001/04/26 06:28:37
@@ -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
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me