[llvm-commits] CVS: gcc-3.4/gcc/llvm-expand.c

Brian Gaeke gaeke at cs.uiuc.edu
Fri Feb 27 01:09:01 PST 2004


Changes in directory gcc-3.4/gcc:

llvm-expand.c updated: 1.14 -> 1.15

---
Log message:

This fixes problems I was having with garbage in double constant output
on SPARC.  It also works on PowerPC. I ran qmtests on the latter, but
on the former qmtest crashed.


---
Diffs of the changes:  (+4 -44)

Index: gcc-3.4/gcc/llvm-expand.c
diff -u gcc-3.4/gcc/llvm-expand.c:1.14 gcc-3.4/gcc/llvm-expand.c:1.15
--- gcc-3.4/gcc/llvm-expand.c:1.14	Fri Feb 20 13:08:37 2004
+++ gcc-3.4/gcc/llvm-expand.c	Fri Feb 27 01:07:56 2004
@@ -4848,50 +4848,10 @@
         BufPtr += 2;
       }
     } else {
-      if (!(FLOAT_WORDS_BIG_ENDIAN))
-      {
-        Values = (char*)RealArr;
-        while (Size--) {
-          sprintf(BufPtr, "%02X", (unsigned char)*Values++);
-          BufPtr += 2;
-        }
-      }
-      else
-      {
-        if (BITS_PER_WORD == 32)
-        {
-          /*
-           * Handle a big endian 32 bit target.
-           */
-          Values = (char*)RealArr;
-          while (Size--) {
-            sprintf(BufPtr, "%02X", (unsigned char)*Values++);
-            BufPtr += 2;
-          }
-        }
-        else
-        {
-          /*
-           * Handle a big endian 64 bit target.
-           *
-           * Note that it appears that GCC thinks that longs are 32 bit (and not
-           * 64 bit like LP/SparcV9 use).  So, grab half of the value from the
-           * first long and the second half from the second long.
-           */
-          Values = (char*)RealArr + 4;
-          Size = 4;
-          while (Size--) {
-            sprintf(BufPtr, "%02X", (unsigned char)*Values++);
-            BufPtr += 2;
-          }
-
-          Values = (char*)RealArr + 12;
-          Size = 4;
-          while (Size--) {
-            sprintf(BufPtr, "%02X", (unsigned char)*Values++);
-            BufPtr += 2;
-          }
-        }
+      Values = (char*)RealArr;
+      while (Size--) {
+        sprintf(BufPtr, "%02X", (unsigned char)*Values++);
+        BufPtr += 2;
       }
     }
     *BufPtr = 0;  /* Null terminate */





More information about the llvm-commits mailing list