Revert "Revert "Use LIRSlowPath for throwing ArrayOutOfBoundsException.""

This adds back using LIRSlowPath for ArrayIndexOutOfBoundsException.
And fix the host test crash.

Change-Id: Idbb602f4bb2c5ce59233feb480a0ff1b216e4887
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
index 65910e9..1f69eb5 100644
--- a/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -567,6 +567,8 @@
     void GenDivZeroCheck(ConditionCode c_code);
     // reg holds divisor.
     void GenDivZeroCheck(RegStorage reg);
+    void GenArrayBoundsCheck(RegStorage index, RegStorage length);
+    void GenArrayBoundsCheck(int32_t index, RegStorage length);
     LIR* GenNullCheck(RegStorage reg);
     void MarkPossibleNullPointerException(int opt_flags);
     void MarkPossibleStackOverflowException();
@@ -1227,6 +1229,10 @@
 
     void AddDivZeroCheckSlowPath(LIR* branch);
 
+    // Copy arg0 and arg1 to kArg0 and kArg1 safely, possibly using
+    // kArg2 as temp.
+    void CopyToArgumentRegs(RegStorage arg0, RegStorage arg1);
+
   public:
     // TODO: add accessors for these.
     LIR* literal_list_;                        // Constants.