rs6000.c (output_toc): Don't use lshift_double when HOST_BITS_PER_WIDE_INT == 64.
authorAlan Modra <amodra@bigpond.net.au>
Fri, 2 Aug 2002 01:08:01 +0000 (01:08 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Fri, 2 Aug 2002 01:08:01 +0000 (10:38 +0930)
* config/rs6000/rs6000.c (output_toc): Don't use lshift_double when
HOST_BITS_PER_WIDE_INT == 64.

From-SVN: r55961

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index de5c2b5..5b5de59 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-02  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when
+       HOST_BITS_PER_WIDE_INT == 64.
+
 2002-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * df.c (df_insn_table_realloc): Change parameter to unsigned.
index e1b3d1e..932a60c 100644 (file)
@@ -11664,8 +11664,17 @@ output_toc (file, x, labelno, mode)
        abort ();/* It would be easy to make this work, but it doesn't now.  */
 
       if (POINTER_SIZE > GET_MODE_BITSIZE (mode))
-       lshift_double (low, high, POINTER_SIZE - GET_MODE_BITSIZE (mode),
-                      POINTER_SIZE, &low, &high, 0);
+       {
+#if HOST_BITS_PER_WIDE_INT == 32
+         lshift_double (low, high, POINTER_SIZE - GET_MODE_BITSIZE (mode),
+                        POINTER_SIZE, &low, &high, 0);
+#else
+         low |= high << 32;
+         low <<= POINTER_SIZE - GET_MODE_BITSIZE (mode);
+         high = (HOST_WIDE_INT) low >> 32;
+         low &= 0xffffffff;
+#endif
+       }
 
       if (TARGET_64BIT)
        {