[llvm-commits] [compiler-rt] r80913 - in /compiler-rt/trunk/lib: clzti2.c cmpti2.c ctzti2.c ffsti2.c fixdfti.c fixunsdfti.c fixunsxfti.c fixxfti.c floattidf.c floattixf.c floatuntidf.c floatuntixf.c multi3.c parityti2.c ucmpti2.c

Edward O'Callaghan eocallaghan at auroraux.org
Thu Sep 3 02:12:20 PDT 2009


Author: evocallaghan
Date: Thu Sep  3 04:12:20 2009
New Revision: 80913

URL: http://llvm.org/viewvc/llvm-project?rev=80913&view=rev
Log:
Fix some files that got left behind in early changeset to unnamed unions fix. Credit to Roman Divacky.

Modified:
    compiler-rt/trunk/lib/clzti2.c
    compiler-rt/trunk/lib/cmpti2.c
    compiler-rt/trunk/lib/ctzti2.c
    compiler-rt/trunk/lib/ffsti2.c
    compiler-rt/trunk/lib/fixdfti.c
    compiler-rt/trunk/lib/fixunsdfti.c
    compiler-rt/trunk/lib/fixunsxfti.c
    compiler-rt/trunk/lib/fixxfti.c
    compiler-rt/trunk/lib/floattidf.c
    compiler-rt/trunk/lib/floattixf.c
    compiler-rt/trunk/lib/floatuntidf.c
    compiler-rt/trunk/lib/floatuntixf.c
    compiler-rt/trunk/lib/multi3.c
    compiler-rt/trunk/lib/parityti2.c
    compiler-rt/trunk/lib/ucmpti2.c

Modified: compiler-rt/trunk/lib/clzti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/clzti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/clzti2.c (original)
+++ compiler-rt/trunk/lib/clzti2.c Thu Sep  3 04:12:20 2009
@@ -25,8 +25,8 @@
 {
     twords x;
     x.all = a;
-    const di_int f = -(x.high == 0);
-    return __builtin_clzll((x.high & ~f) | (x.low & f)) +
+    const di_int f = -(x.s.high == 0);
+    return __builtin_clzll((x.s.high & ~f) | (x.s.low & f)) +
            ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
 }
 

Modified: compiler-rt/trunk/lib/cmpti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/cmpti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/cmpti2.c (original)
+++ compiler-rt/trunk/lib/cmpti2.c Thu Sep  3 04:12:20 2009
@@ -28,13 +28,13 @@
     x.all = a;
     twords y;
     y.all = b;
-    if (x.high < y.high)
+    if (x.s.high < y.s.high)
         return 0;
-    if (x.high > y.high)
+    if (x.s.high > y.s.high)
         return 2;
-    if (x.low < y.low)
+    if (x.s.low < y.s.low)
         return 0;
-    if (x.low > y.low)
+    if (x.s.low > y.s.low)
         return 2;
     return 1;
 }

Modified: compiler-rt/trunk/lib/ctzti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ctzti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/ctzti2.c (original)
+++ compiler-rt/trunk/lib/ctzti2.c Thu Sep  3 04:12:20 2009
@@ -25,8 +25,8 @@
 {
     twords x;
     x.all = a;
-    const di_int f = -(x.low == 0);
-    return __builtin_ctzll((x.high & f) | (x.low & ~f)) +
+    const di_int f = -(x.s.low == 0);
+    return __builtin_ctzll((x.s.high & f) | (x.s.low & ~f)) +
               ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
 }
 

Modified: compiler-rt/trunk/lib/ffsti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ffsti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/ffsti2.c (original)
+++ compiler-rt/trunk/lib/ffsti2.c Thu Sep  3 04:12:20 2009
@@ -25,13 +25,13 @@
 {
     twords x;
     x.all = a;
-    if (x.low == 0)
+    if (x.s.low == 0)
     {
-        if (x.high == 0)
+        if (x.s.high == 0)
             return 0;
-        return __builtin_ctzll(x.high) + (1 + sizeof(di_int) * CHAR_BIT);
+        return __builtin_ctzll(x.s.high) + (1 + sizeof(di_int) * CHAR_BIT);
     }
-    return __builtin_ctzll(x.low) + 1;
+    return __builtin_ctzll(x.s.low) + 1;
 }
 
 #endif /* __x86_64 */

Modified: compiler-rt/trunk/lib/fixdfti.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fixdfti.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/fixdfti.c (original)
+++ compiler-rt/trunk/lib/fixdfti.c Thu Sep  3 04:12:20 2009
@@ -30,10 +30,10 @@
 {
     double_bits fb;
     fb.f = a;
-    int e = ((fb.u.high & 0x7FF00000) >> 20) - 1023;
+    int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023;
     if (e < 0)
         return 0;
-    ti_int s = (si_int)(fb.u.high & 0x80000000) >> 31;
+    ti_int s = (si_int)(fb.u.s.high & 0x80000000) >> 31;
     ti_int r = 0x0010000000000000uLL | (0x000FFFFFFFFFFFFFuLL & fb.u.all);
     if (e > 52)
         r <<= (e - 52);

Modified: compiler-rt/trunk/lib/fixunsdfti.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fixunsdfti.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/fixunsdfti.c (original)
+++ compiler-rt/trunk/lib/fixunsdfti.c Thu Sep  3 04:12:20 2009
@@ -33,8 +33,8 @@
 {
     double_bits fb;
     fb.f = a;
-    int e = ((fb.u.high & 0x7FF00000) >> 20) - 1023;
-    if (e < 0 || (fb.u.high & 0x80000000))
+    int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023;
+    if (e < 0 || (fb.u.s.high & 0x80000000))
         return 0;
     tu_int r = 0x0010000000000000uLL | (fb.u.all & 0x000FFFFFFFFFFFFFuLL);
     if (e > 52)

Modified: compiler-rt/trunk/lib/fixunsxfti.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fixunsxfti.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/fixunsxfti.c (original)
+++ compiler-rt/trunk/lib/fixunsxfti.c Thu Sep  3 04:12:20 2009
@@ -35,8 +35,8 @@
 {
     long_double_bits fb;
     fb.f = a;
-    int e = (fb.u.high.low & 0x00007FFF) - 16383;
-    if (e < 0 || (fb.u.high.low & 0x00008000))
+    int e = (fb.u.high.s.low & 0x00007FFF) - 16383;
+    if (e < 0 || (fb.u.high.s.low & 0x00008000))
         return 0;
     tu_int r = fb.u.low.all;
     if (e > 63)

Modified: compiler-rt/trunk/lib/fixxfti.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fixxfti.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/fixxfti.c (original)
+++ compiler-rt/trunk/lib/fixxfti.c Thu Sep  3 04:12:20 2009
@@ -32,10 +32,10 @@
 {
     long_double_bits fb;
     fb.f = a;
-    int e = (fb.u.high.low & 0x00007FFF) - 16383;
+    int e = (fb.u.high.s.low & 0x00007FFF) - 16383;
     if (e < 0)
         return 0;
-    ti_int s = -(si_int)((fb.u.high.low & 0x00008000) >> 15);
+    ti_int s = -(si_int)((fb.u.high.s.low & 0x00008000) >> 15);
     ti_int r = fb.u.low.all;
     if (e > 63)
         r <<= (e - 63);

Modified: compiler-rt/trunk/lib/floattidf.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/floattidf.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/floattidf.c (original)
+++ compiler-rt/trunk/lib/floattidf.c Thu Sep  3 04:12:20 2009
@@ -76,10 +76,10 @@
         /* a is now rounded to DBL_MANT_DIG bits */
     }
     double_bits fb;
-    fb.u.high = ((su_int)s & 0x80000000) |        /* sign */
+    fb.u.s.high = ((su_int)s & 0x80000000) |        /* sign */
                 ((e + 1023) << 20)      |        /* exponent */
                 ((su_int)(a >> 32) & 0x000FFFFF); /* mantissa-high */
-    fb.u.low = (su_int)a;                         /* mantissa-low */
+    fb.u.s.low = (su_int)a;                         /* mantissa-low */
     return fb.f;
 }
 

Modified: compiler-rt/trunk/lib/floattixf.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/floattixf.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/floattixf.c (original)
+++ compiler-rt/trunk/lib/floattixf.c Thu Sep  3 04:12:20 2009
@@ -78,7 +78,7 @@
         /* a is now rounded to LDBL_MANT_DIG bits */
     }
     long_double_bits fb;
-    fb.u.high.low = ((su_int)s & 0x8000) |        /* sign */
+    fb.u.high.s.low = ((su_int)s & 0x8000) |        /* sign */
                     (e + 16383);                  /* exponent */
     fb.u.low.all = (du_int)a;                     /* mantissa */
     return fb.f;

Modified: compiler-rt/trunk/lib/floatuntidf.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/floatuntidf.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/floatuntidf.c (original)
+++ compiler-rt/trunk/lib/floatuntidf.c Thu Sep  3 04:12:20 2009
@@ -74,9 +74,9 @@
         /* a is now rounded to DBL_MANT_DIG bits */
     }
     double_bits fb;
-    fb.u.high = ((e + 1023) << 20)      |        /* exponent */
+    fb.u.s.high = ((e + 1023) << 20)      |        /* exponent */
                 ((su_int)(a >> 32) & 0x000FFFFF); /* mantissa-high */
-    fb.u.low = (su_int)a;                         /* mantissa-low */
+    fb.u.s.low = (su_int)a;                         /* mantissa-low */
     return fb.f;
 }
 

Modified: compiler-rt/trunk/lib/floatuntixf.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/floatuntixf.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/floatuntixf.c (original)
+++ compiler-rt/trunk/lib/floatuntixf.c Thu Sep  3 04:12:20 2009
@@ -76,7 +76,7 @@
         /* a is now rounded to LDBL_MANT_DIG bits */
     }
     long_double_bits fb;
-    fb.u.high.low = (e + 16383);                  /* exponent */
+    fb.u.high.s.low = (e + 16383);                  /* exponent */
     fb.u.low.all = (du_int)a;                     /* mantissa */
     return fb.f;
 }

Modified: compiler-rt/trunk/lib/multi3.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/multi3.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/multi3.c (original)
+++ compiler-rt/trunk/lib/multi3.c Thu Sep  3 04:12:20 2009
@@ -50,8 +50,8 @@
     twords y;
     y.all = b;
     twords r;
-    r.all = __mulddi3(x.low, y.low);
-    r.s.high += x.high * y.low + x.low * y.high;
+    r.all = __mulddi3(x.s.low, y.s.low);
+    r.s.high += x.s.high * y.s.low + x.s.low * y.s.high;
     return r.all;
 }
 

Modified: compiler-rt/trunk/lib/parityti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/parityti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/parityti2.c (original)
+++ compiler-rt/trunk/lib/parityti2.c Thu Sep  3 04:12:20 2009
@@ -25,7 +25,7 @@
 {
     twords x;
     x.all = a;
-    return __paritydi2(x.high ^ x.low);
+    return __paritydi2(x.s.high ^ x.s.low);
 }
 
 #endif

Modified: compiler-rt/trunk/lib/ucmpti2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ucmpti2.c?rev=80913&r1=80912&r2=80913&view=diff

==============================================================================
--- compiler-rt/trunk/lib/ucmpti2.c (original)
+++ compiler-rt/trunk/lib/ucmpti2.c Thu Sep  3 04:12:20 2009
@@ -28,13 +28,13 @@
     x.all = a;
     utwords y;
     y.all = b;
-    if (x.high < y.high)
+    if (x.s.high < y.s.high)
         return 0;
-    if (x.high > y.high)
+    if (x.s.high > y.s.high)
         return 2;
-    if (x.low < y.low)
+    if (x.s.low < y.s.low)
         return 0;
-    if (x.low > y.low)
+    if (x.s.low > y.s.low)
         return 2;
     return 1;
 }





More information about the llvm-commits mailing list