OSDN Git Service

Subzero. ARM32. Enable more crosstests.
authorEric Holk <eholk@chromium.org>
Wed, 17 Feb 2016 23:47:22 +0000 (15:47 -0800)
committerEric Holk <eholk@chromium.org>
Wed, 17 Feb 2016 23:47:22 +0000 (15:47 -0800)
This removes most of the #ifndef ARM32 directives so we get more
thorough testing. It still uses fewer iterations due to running on
Qemu, but I did manually check to be sure that the tests pass without
any special casing at all.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076
R=jpp@chromium.org, kschimpf@google.com

Review URL: https://codereview.chromium.org/1708903002 .

crosstest/test_arith_main.cpp
crosstest/test_calling_conv.cpp
crosstest/test_cast_main.cpp
crosstest/test_fcmp_main.cpp
crosstest/test_icmp_main.cpp

index 08fe361..9eb4d75 100644 (file)
@@ -164,8 +164,6 @@ const static size_t MaxTestsPerFunc = 100000;
 
 template <typename TypeUnsignedLabel, typename TypeSignedLabel>
 void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
-#if !defined(ARM32)
-  // TODO(jpp): remove this once vector support is implemented.
   typedef typename Vectors<TypeUnsignedLabel>::Ty TypeUnsigned;
   typedef typename Vectors<TypeSignedLabel>::Ty TypeSigned;
   typedef typename Vectors<TypeUnsignedLabel>::ElementTy ElementTypeUnsigned;
@@ -241,7 +239,6 @@ void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
       }
     }
   }
-#endif // !ARM32
 }
 
 template <typename Type>
@@ -317,8 +314,6 @@ void testsFp(size_t &TotalTests, size_t &Passes, size_t &Failures) {
 }
 
 void testsVecFp(size_t &TotalTests, size_t &Passes, size_t &Failures) {
-#if !defined(ARM32)
-  // TODO(jpp): remove this once vector support is implemented.
   static const float NegInf = -1.0 / 0.0;
   static const float PosInf = 1.0 / 0.0;
   static const float Nan = 0.0 / 0.0;
@@ -377,7 +372,6 @@ void testsVecFp(size_t &TotalTests, size_t &Passes, size_t &Failures) {
       }
     }
   }
-#endif // !ARM32
 }
 
 int main(int argc, char *argv[]) {
index 2ff9038..d6a8b1d 100644 (file)
@@ -66,8 +66,6 @@ void __attribute__((noinline)) callee_i(int arg1) {
 
 void __attribute__((noinline))
 callee_vvvvv(v4si32 arg1, v4si32 arg2, v4si32 arg3, v4si32 arg4, v4si32 arg5) {
-#ifndef ARM32
-  // TODO(jpp): remove this once vector support is implemented.
   switch (ArgNum) {
     HANDLE_ARG(1);
     HANDLE_ARG(2);
@@ -75,7 +73,6 @@ callee_vvvvv(v4si32 arg1, v4si32 arg2, v4si32 arg3, v4si32 arg4, v4si32 arg5) {
     HANDLE_ARG(4);
     HANDLE_ARG(5);
   }
-#endif // ARM32
 }
 
 void __attribute__((noinline))
@@ -83,15 +80,12 @@ callee_vlvilvfvdviv(v4f32 arg1, int64 arg2, v4f32 arg3, int arg4, int64 arg5,
                     v4f32 arg6, float arg7, v4f32 arg8, double arg9,
                     v4f32 arg10, int arg11, v4f32 arg12) {
   switch (ArgNum) {
-#ifndef ARM32
-    // TODO(jpp): remove this once vector support is implemented.
     HANDLE_ARG(1);
     HANDLE_ARG(3);
     HANDLE_ARG(6);
     HANDLE_ARG(8);
     HANDLE_ARG(10);
     HANDLE_ARG(12);
-#endif // ARM32
     HANDLE_ARG(2);
     HANDLE_ARG(4);
     HANDLE_ARG(5);
index 996a063..964c30e 100644 (file)
@@ -92,8 +92,6 @@ void testValue(FromType Val, size_t &TotalTests, size_t &Passes,
 template <typename FromType, typename ToType>
 void testVector(size_t &TotalTests, size_t &Passes, size_t &Failures,
                 const char *FromTypeString, const char *ToTypeString) {
-#ifndef ARM32
-  // TODO(jpp): remove this once vector support is implemented.
   const static size_t NumElementsInType = Vectors<FromType>::NumElements;
   PRNG Index;
   static const float NegInf = -1.0 / 0.0;
@@ -111,7 +109,6 @@ void testVector(size_t &TotalTests, size_t &Passes, size_t &Failures,
     }
     COMPARE_VEC(cast, FromType, ToType, Value, FromTypeString, ToTypeString);
   }
-#endif // ARM32
 }
 
 int main(int argc, char *argv[]) {
index 2bff297..5d195ca 100644 (file)
@@ -158,8 +158,6 @@ void testsScalar(size_t &TotalTests, size_t &Passes, size_t &Failures) {
 }
 
 void testsVector(size_t &TotalTests, size_t &Passes, size_t &Failures) {
-#ifndef ARM32
-  // TODO(jpp): remove this once vector support is implemented.
   typedef v4si32 (*FuncTypeVector)(v4f32, v4f32);
   static struct {
     const char *Name;
@@ -201,7 +199,6 @@ void testsVector(size_t &TotalTests, size_t &Passes, size_t &Failures) {
       }
     }
   }
-#endif // ARM32
 }
 
 int main(int argc, char *argv[]) {
index b4db01b..42177ff 100644 (file)
@@ -198,8 +198,6 @@ const static size_t MaxTestsPerFunc = 100000;
 
 template <typename TypeUnsignedLabel, typename TypeSignedLabel>
 void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
-#if !defined(ARM32)
-  // TODO(jpp): remove this once vector support is implemented.
   typedef typename Vectors<TypeUnsignedLabel>::Ty TypeUnsigned;
   typedef typename Vectors<TypeSignedLabel>::Ty TypeSigned;
   typedef typename Vectors<TypeUnsignedLabel>::ElementTy ElementTypeUnsigned;
@@ -257,7 +255,6 @@ void testsVecInt(size_t &TotalTests, size_t &Passes, size_t &Failures) {
       }
     }
   }
-#endif // !ARM32
 }
 
 // Return true on wraparound
@@ -278,8 +275,6 @@ incrementI1Vector(typename Vectors<T>::Ty &Vect) {
 
 template <typename T>
 void testsVecI1(size_t &TotalTests, size_t &Passes, size_t &Failures) {
-#if !defined(ARM32)
-  // TODO(jpp): remove this once vector support is implemented.
   typedef typename Vectors<T>::Ty Ty;
   typedef Ty (*FuncType)(Ty, Ty);
   static struct {
@@ -347,7 +342,6 @@ void testsVecI1(size_t &TotalTests, size_t &Passes, size_t &Failures) {
       }
     }
   }
-#endif // !ARM32
 }
 
 int main(int argc, char *argv[]) {