Initialize the rest of libcore's native code.

This native code requires NewGlobalRef, so this patch also implements
NewLocalRef/DeleteLocalRef, NewGlobalRef/DeleteGlobalRef, and
NewWeakGlobalRef/DeleteWeakGlobalRef.

(The assembler change is because "math.h" also defines OVERFLOW. A slight
change in #include ordering caused the names to conflict.)

Change-Id: Ifbf3b532ec3b0896bd7507d2881c6b77b64f01e7
diff --git a/src/assembler_x86.cc b/src/assembler_x86.cc
index 693f1b4..78a20c0 100644
--- a/src/assembler_x86.cc
+++ b/src/assembler_x86.cc
@@ -1560,7 +1560,7 @@
       xorl(out_reg.AsCpuRegister(), out_reg.AsCpuRegister());
     }
     testl(in_reg.AsCpuRegister(), in_reg.AsCpuRegister());
-    j(ZERO, &null_arg);
+    j(kZero, &null_arg);
     leal(out_reg.AsCpuRegister(), Address(ESP, handle_offset));
     Bind(&null_arg);
   } else {
@@ -1576,7 +1576,7 @@
     Label null_arg;
     movl(scratch.AsCpuRegister(), Address(ESP, handle_offset));
     testl(scratch.AsCpuRegister(), scratch.AsCpuRegister());
-    j(ZERO, &null_arg);
+    j(kZero, &null_arg);
     leal(scratch.AsCpuRegister(), Address(ESP, handle_offset));
     Bind(&null_arg);
   } else {
@@ -1595,7 +1595,7 @@
     xorl(out_reg.AsCpuRegister(), out_reg.AsCpuRegister());
   }
   testl(in_reg.AsCpuRegister(), in_reg.AsCpuRegister());
-  j(ZERO, &null_arg);
+  j(kZero, &null_arg);
   movl(out_reg.AsCpuRegister(), Address(in_reg.AsCpuRegister(), 0));
   Bind(&null_arg);
 }
@@ -1627,7 +1627,7 @@
       new SuspendCountSlowPath(return_reg, return_save_location, return_size);
   buffer_.EnqueueSlowPath(slow);
   fs()->cmpl(Address::Absolute(Thread::SuspendCountOffset()), Immediate(0));
-  j(NOT_EQUAL, slow->Entry());
+  j(kNotEqual, slow->Entry());
   Bind(slow->Continuation());
 }
 
@@ -1651,7 +1651,7 @@
   ExceptionSlowPath* slow = new ExceptionSlowPath();
   buffer_.EnqueueSlowPath(slow);
   fs()->cmpl(Address::Absolute(Thread::ExceptionOffset()), Immediate(0));
-  j(NOT_EQUAL, slow->Entry());
+  j(kNotEqual, slow->Entry());
   Bind(slow->Continuation());
 }