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/Thumb2Util.c b/vm/compiler/codegen/arm/Thumb2Util.c
index 8d3ce07..559cf0d 100644
--- a/vm/compiler/codegen/arm/Thumb2Util.c
+++ b/vm/compiler/codegen/arm/Thumb2Util.c
@@ -639,10 +639,11 @@
     ArmLIR *branch;
     int modImm;
     /*
-     * TODO: re-enable usage of THUMB2_CBZ & THUMB2_CBNZ once assembler is enhanced
-     * to allow us to replace code patterns when instructions don't reach.  Currently,
-     * CB[N]Z is causing too many assembler aborts.  What we want to do is emit
-     * the short forms, and then replace them with longer versions when needed.
+     * TODO: re-enable usage of THUMB2_CBZ & THUMB2_CBNZ once assembler is
+     * enhanced to allow us to replace code patterns when instructions don't
+     * reach.  Currently, CB[N]Z is causing too many assembler aborts.
+     * What we want to do is emit the short forms, and then replace them with
+     * longer versions when needed.
      */
     if (0 && (LOWREG(reg)) && (checkValue == 0) &&
        ((cond == ARM_COND_EQ) || (cond == ARM_COND_NE))) {