saugustine created this revision.

These functions were disabled for powerpc in the initial
checkin all the way back in 2009. The reasons why are lost to history,
but they work fine with modern clang and powerpc64.  I have no way
to test them on 32-bit systems, but will clean this up if the someone
finds a failure.


https://reviews.llvm.org/D36764

Files:
  compiler-rt/lib/builtins/divxc3.c
  compiler-rt/lib/builtins/mulxc3.c
  compiler-rt/lib/builtins/powixf2.c
  compiler-rt/test/builtins/Unit/divxc3_test.c
  compiler-rt/test/builtins/Unit/mulxc3_test.c
  compiler-rt/test/builtins/Unit/powixf2_test.c

Index: compiler-rt/test/builtins/Unit/powixf2_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/powixf2_test.c
+++ compiler-rt/test/builtins/Unit/powixf2_test.c
@@ -1,5 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// UNSUPPORTED: powerpc64
 //===-- powixf2_test.cpp - Test __powixf2 ---------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
@@ -13,8 +12,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 #include <stdio.h>
 #include <math.h>
@@ -33,11 +30,8 @@
     return !correct;
 }
 
-#endif
-
 int main()
 {
-#if !_ARCH_PPC
     if (test__powixf2(0, 0, 1))
         return 1;
     if (test__powixf2(1, 0, 1))
@@ -227,8 +221,5 @@
     if (test__powixf2(-2, -31, -1/2147483648.))
         return 1;
 
-#else
-    printf("skipped\n");
-#endif
     return 0;
 }
Index: compiler-rt/test/builtins/Unit/mulxc3_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/mulxc3_test.c
+++ compiler-rt/test/builtins/Unit/mulxc3_test.c
@@ -1,5 +1,4 @@
 // RUN: %clang_builtins %s %librt -lm -o %t && %run %t
-// UNSUPPORTED: powerpc64
 //===-- mulxc3_test.c - Test __mulxc3 -------------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
@@ -13,8 +12,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 #include <math.h>
 #include <complex.h>
@@ -357,11 +354,8 @@
 
 };
 
-#endif
-
 int main()
 {
-#if !_ARCH_PPC
     const unsigned N = sizeof(x) / sizeof(x[0]);
     unsigned i, j;
     for (i = 0; i < N; ++i)
@@ -373,8 +367,5 @@
         }
     }
 
-#else
-    printf("skipped\n");
-#endif
     return 0;
 }
Index: compiler-rt/test/builtins/Unit/divxc3_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/divxc3_test.c
+++ compiler-rt/test/builtins/Unit/divxc3_test.c
@@ -1,5 +1,4 @@
 // RUN: %clang_builtins %s %librt -lm -o %t && %run %t
-// UNSUPPORTED: powerpc64
 //===-- divxc3_test.c - Test __divxc3 -------------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
@@ -13,8 +12,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 #include <math.h>
 #include <complex.h>
@@ -361,11 +358,8 @@
 
 };
 
-#endif
-
 int main()
 {
-#if !_ARCH_PPC
     const unsigned N = sizeof(x) / sizeof(x[0]);
     unsigned i, j;
     for (i = 0; i < N; ++i)
@@ -377,8 +371,5 @@
         }
     }
 
-#else
-    printf("skipped\n");
-#endif
     return 0;
 }
Index: compiler-rt/lib/builtins/powixf2.c
===================================================================
--- compiler-rt/lib/builtins/powixf2.c
+++ compiler-rt/lib/builtins/powixf2.c
@@ -12,8 +12,6 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 
 /* Returns: a ^ b */
@@ -34,5 +32,3 @@
     }
     return recip ? 1/r : r;
 }
-
-#endif
Index: compiler-rt/lib/builtins/mulxc3.c
===================================================================
--- compiler-rt/lib/builtins/mulxc3.c
+++ compiler-rt/lib/builtins/mulxc3.c
@@ -12,8 +12,6 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 #include "int_math.h"
 
@@ -73,5 +71,3 @@
     }
     return z;
 }
-
-#endif
Index: compiler-rt/lib/builtins/divxc3.c
===================================================================
--- compiler-rt/lib/builtins/divxc3.c
+++ compiler-rt/lib/builtins/divxc3.c
@@ -11,8 +11,6 @@
  *
  */
 
-#if !_ARCH_PPC
-
 #include "int_lib.h"
 #include "int_math.h"
 
@@ -59,5 +57,3 @@
     }
     return z;
 }
-
-#endif
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to