Various bug fixes for armv5 and loop/self-verification co-existence.

Fixed the out-of-bound problem for RegImm compares when imm cannot be encoded.

Renamed insertRegRegCheck to genRegRegCheck to be consistent with other code.

Fixed the loop formation code to break out of the tight loop in each iteration
when self-verification is enabled.
diff --git a/vm/compiler/codegen/arm/Codegen.c b/vm/compiler/codegen/arm/Codegen.c
index 2d2e533..a34a1b3 100644
--- a/vm/compiler/codegen/arm/Codegen.c
+++ b/vm/compiler/codegen/arm/Codegen.c
@@ -654,10 +654,10 @@
  * Perform a "reg cmp reg" operation and jump to the PCR region if condition
  * satisfies.
  */
-static inline ArmLIR *insertRegRegCheck(CompilationUnit *cUnit,
-                                           ArmConditionCode cond,
-                                           int reg1, int reg2, int dOffset,
-                                           ArmLIR *pcrLabel)
+static inline ArmLIR *genRegRegCheck(CompilationUnit *cUnit,
+                                     ArmConditionCode cond,
+                                     int reg1, int reg2, int dOffset,
+                                     ArmLIR *pcrLabel)
 {
     ArmLIR *res;
     res = opRegReg(cUnit, OP_CMP, reg1, reg2);
@@ -696,7 +696,7 @@
 static ArmLIR *genBoundsCheck(CompilationUnit *cUnit, int rIndex,
                                   int rBound, int dOffset, ArmLIR *pcrLabel)
 {
-    return insertRegRegCheck(cUnit, ARM_COND_CS, rIndex, rBound, dOffset,
+    return genRegRegCheck(cUnit, ARM_COND_CS, rIndex, rBound, dOffset,
                             pcrLabel);
 }
 
@@ -3489,8 +3489,8 @@
         opRegImm(cUnit, OP_ADD, regIdxEnd, delta, regIdxEnd);
     }
     /* Punt if "regIdxEnd < len(Array)" is false */
-    insertRegRegCheck(cUnit, ARM_COND_GE, regIdxEnd, regLength, 0,
-                      (ArmLIR *) cUnit->loopAnalysis->branchToPCR);
+    genRegRegCheck(cUnit, ARM_COND_GE, regIdxEnd, regLength, 0,
+                   (ArmLIR *) cUnit->loopAnalysis->branchToPCR);
 }
 
 /*
@@ -3525,8 +3525,8 @@
     }
 
     /* Punt if "regIdxInit < len(Array)" is false */
-    insertRegRegCheck(cUnit, ARM_COND_GE, regIdxInit, regLength, 0,
-                      (ArmLIR *) cUnit->loopAnalysis->branchToPCR);
+    genRegRegCheck(cUnit, ARM_COND_GE, regIdxInit, regLength, 0,
+                   (ArmLIR *) cUnit->loopAnalysis->branchToPCR);
 }
 
 /*