Fix for DF split
authorTom Rix <trix@redhat.com>
Sat, 19 Jan 2002 15:40:35 +0000 (15:40 +0000)
committerTom Rix <trix@gcc.gnu.org>
Sat, 19 Jan 2002 15:40:35 +0000 (15:40 +0000)
From-SVN: r49011

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 20612cc687af74dd1bd34c23ed97d19edfbc70d9..d9008b6e8b72fe6c8709abd7d841c1d97a4a6aa3 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-19  Tom Rix  <trix@redhat.com>
+
+       * config/rs6000/rs6000.md: Fix DF split for 64 bit hosts.
+
 2002-01-18  Aldy Hernandez  <aldyh@redhat.com>
 
         * doc/tm.texi (STARTING_FRAME_PHASE): Document.
index 6644f2507c947b9fcaa4d9dda27e62937cb7788f..3a762931316199860380b1de507e1dda50e74af6 100644 (file)
   int endian = (WORDS_BIG_ENDIAN == 0);
   long l[2];
   REAL_VALUE_TYPE rv;
+  HOST_WIDE_INT val;
 
   REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]);
   REAL_VALUE_TO_TARGET_DOUBLE (rv, l);
 
   operands[2] = gen_lowpart (DImode, operands[0]);
   /* HIGHPART is lower memory address when WORDS_BIG_ENDIAN.  */
+#if HOST_BITS_PER_WIDE_INT >= 64
+  val = ((HOST_WIDE_INT)(unsigned long)l[endian] << 32 |
+        ((HOST_WIDE_INT)(unsigned long)l[1 - endian]));
+
+  operands[3] = immed_double_const (val, -(val < 0), DImode);
+#else
   operands[3] = immed_double_const (l[1 - endian], l[endian], DImode);
+#endif
 }")
 
 ;; Don't have reload use general registers to load a constant.  First,