Refactor runtime support.

Change-Id: Id7470a4105838150d5ceb73ab2c8c83e739660df
diff --git a/src/compiler/codegen/mips/ArchFactory.cc b/src/compiler/codegen/mips/ArchFactory.cc
index b7f055d..5e41400 100644
--- a/src/compiler/codegen/mips/ArchFactory.cc
+++ b/src/compiler/codegen/mips/ArchFactory.cc
@@ -22,6 +22,8 @@
  *
  */
 
+#include "oat/runtime/oat_support_entrypoints.h"
+
 namespace art {
 
 bool genAddLong(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest,
@@ -191,7 +193,7 @@
     if (cUnit->genDebugger) {
         // Refresh update debugger callout
         loadWordDisp(cUnit, rSELF,
-                     OFFSETOF_MEMBER(Thread, pUpdateDebuggerFromCode), rSUSPEND);
+                     ENTRYPOINT_OFFSET(pUpdateDebuggerFromCode), rSUSPEND);
         genDebuggerUpdate(cUnit, DEBUGGER_METHOD_ENTRY);
     }
 
diff --git a/src/compiler/codegen/mips/FP/MipsFP.cc b/src/compiler/codegen/mips/FP/MipsFP.cc
index 6524641..948ded6 100644
--- a/src/compiler/codegen/mips/FP/MipsFP.cc
+++ b/src/compiler/codegen/mips/FP/MipsFP.cc
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "oat/runtime/oat_support_entrypoints.h"
+
 namespace art {
 
 bool genArithOpFloat(CompilationUnit *cUnit, MIR *mir, RegLocation rlDest,
@@ -191,18 +193,18 @@
 
     switch (mir->dalvikInsn.opcode) {
         case Instruction::CMPL_FLOAT:
-            offset = OFFSETOF_MEMBER(Thread, pCmplFloat);
+            offset = ENTRYPOINT_OFFSET(pCmplFloat);
             wide = false;
             break;
         case Instruction::CMPG_FLOAT:
-            offset = OFFSETOF_MEMBER(Thread, pCmpgFloat);
+            offset = ENTRYPOINT_OFFSET(pCmpgFloat);
             wide = false;
             break;
         case Instruction::CMPL_DOUBLE:
-            offset = OFFSETOF_MEMBER(Thread, pCmplDouble);
+            offset = ENTRYPOINT_OFFSET(pCmplDouble);
             break;
         case Instruction::CMPG_DOUBLE:
-            offset = OFFSETOF_MEMBER(Thread, pCmpgDouble);
+            offset = ENTRYPOINT_OFFSET(pCmpgDouble);
             break;
         default:
             return true;
diff --git a/src/compiler/codegen/mips/Mips32/Gen.cc b/src/compiler/codegen/mips/Mips32/Gen.cc
index bf65ba6..b810f98 100644
--- a/src/compiler/codegen/mips/Mips32/Gen.cc
+++ b/src/compiler/codegen/mips/Mips32/Gen.cc
@@ -22,6 +22,8 @@
  *
  */
 
+#include "oat/runtime/oat_support_entrypoints.h"
+
 namespace art {
 
 void genSpecialCase(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir,
@@ -245,8 +247,7 @@
     genBarrier(cUnit);
     newLIR0(cUnit, kMipsCurrPC);  // Really a jal to .+8
     // Now, fill the branch delay slot with the helper load
-    int rTgt = loadHelper(cUnit, OFFSETOF_MEMBER(Thread,
-                          pHandleFillArrayDataFromCode));
+    int rTgt = loadHelper(cUnit, ENTRYPOINT_OFFSET(pHandleFillArrayDataFromCode));
     genBarrier(cUnit);  // Scheduling barrier
 
     // Construct BaseLabel and set up table base register
@@ -291,7 +292,7 @@
     oatLockCallTemps(cUnit);  // Prepare for explicit register usage
     genNullCheck(cUnit, rlSrc.sRegLow, rARG0, mir);
     // Go expensive route - artLockObjectFromCode(self, obj);
-    int rTgt = loadHelper(cUnit, OFFSETOF_MEMBER(Thread, pLockObjectFromCode));
+    int rTgt = loadHelper(cUnit, ENTRYPOINT_OFFSET(pLockObjectFromCode));
     oatClobberCalleeSave(cUnit);
     opReg(cUnit, kOpBlx, rTgt);
 }
@@ -306,7 +307,7 @@
     oatLockCallTemps(cUnit);  // Prepare for explicit register usage
     genNullCheck(cUnit, rlSrc.sRegLow, rARG0, mir);
     // Go expensive route - UnlockObjectFromCode(obj);
-    int rTgt = loadHelper(cUnit, OFFSETOF_MEMBER(Thread, pUnlockObjectFromCode));
+    int rTgt = loadHelper(cUnit, ENTRYPOINT_OFFSET(pUnlockObjectFromCode));
     oatClobberCalleeSave(cUnit);
     opReg(cUnit, kOpBlx, rTgt);
 }