Various bug fixes and new tests.

Amusingly realized that many tests believed to be passing were in fact not
running at all.  The test harness returned 0 if the test wasn't run, but some
of the tests used 0 as a success code.  Will change the tests later.

Most were failing only because the function pointer table in Thread wasn't
fully initialized with the math helper functions.

Change-Id: If2e42f06139f219a423eef475b599258ccfc82d4
diff --git a/src/thread.cc b/src/thread.cc
index 047c89d..4d9386f 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -37,34 +37,32 @@
   pShlLong = art_shl_long;
   pShrLong = art_shr_long;
   pUshrLong = art_ushr_long;
+  pIdiv = __aeabi_idiv;
+  pIdivmod = __aeabi_idivmod;
+  pI2f = __aeabi_i2f;
+  pF2iz = __aeabi_f2iz;
+  pD2f = __aeabi_d2f;
+  pF2d = __aeabi_f2d;
+  pD2iz = __aeabi_d2iz;
+  pL2f = __aeabi_l2f;
+  pL2d = __aeabi_l2d;
+  pFadd = __aeabi_fadd;
+  pFsub = __aeabi_fsub;
+  pFdiv = __aeabi_fdiv;
+  pFmul = __aeabi_fmul;
+  pFmodf = fmodf;
+  pDadd = __aeabi_dadd;
+  pDsub = __aeabi_dsub;
+  pDdiv = __aeabi_ddiv;
+  pDmul = __aeabi_dmul;
+  pFmod = fmod;
+  pArtF2l = artF2L;
+  pArtD2l = artD2L;
+  pLdivmod = __aeabi_ldivmod;
 #endif
   pArtAllocArrayByClass = Array::Alloc;
   pMemcpy = memcpy;
 #if 0
-//void* (Thread::*pMemcpy)(void*, const void*, size_t) /* = memcpy*/ ;
-float (Thread::*pI2f)(int);
-int (Thread::*pF2iz)(float);
-float (Thread::*pD2f)(double);
-double (Thread::*pF2d)(float);
-double (Thread::*pI2d)(int);
-int (Thread::*pD2iz)(double);
-float (Thread::*pL2f)(long);
-double (Thread::*pL2d)(long);
-long long (Thread::*pArtF2l)(float);
-long long (Thread::*pArtD2l)(double);
-float (Thread::*pFadd)(float, float);
-float (Thread::*pFsub)(float, float);
-float (Thread::*pFdiv)(float, float);
-float (Thread::*pFmul)(float, float);
-float (Thread::*pFmodf)(float, float);
-double (Thread::*pDadd)(double, double);
-double (Thread::*pDsub)(double, double);
-double (Thread::*pDdiv)(double, double);
-double (Thread::*pDmul)(double, double);
-double (Thread::*pFmod)(double, double);
-int (Thread::*pIdivmod)(int, int);
-int (Thread::*pIdiv)(int, int);
-long long (Thread::*pLdivmod)(long long, long long);
 bool (Thread::*pArtUnlockObject)(struct Thread*, struct Object*);
 bool (Thread::*pArtCanPutArrayElementNoThrow)(const struct ClassObject*,
       const struct ClassObject*);