Improved codegen for inline, continuing codegen restructuring
Added support for Thumb2 IT. Moved compare-long and floating point
comparisons inline. Temporarily disabled use of Thumb2 CBZ & CBNZ
because they were causing too many out-of-range assembly restarts.
Bug fix for LIR3 assert.
diff --git a/vm/compiler/codegen/arm/ArchUtility.c b/vm/compiler/codegen/arm/ArchUtility.c
index eeee00b..3d55abd 100644
--- a/vm/compiler/codegen/arm/ArchUtility.c
+++ b/vm/compiler/codegen/arm/ArchUtility.c
@@ -82,6 +82,13 @@
assert((unsigned)(nc-'0') < 4);
operand = lir->operands[nc-'0'];
switch(*fmt++) {
+ case 'b':
+ strcpy(tbuf,"0000");
+ for (i=3; i>= 0; i--) {
+ tbuf[i] += operand & 1;
+ operand >>= 1;
+ }
+ break;
case 'n':
operand = ~expandImmediate(operand);
sprintf(tbuf,"%d [0x%x]", operand, operand);
@@ -115,28 +122,28 @@
case 'c':
switch (operand) {
case ARM_COND_EQ:
- strcpy(tbuf, "beq");
+ strcpy(tbuf, "eq");
break;
case ARM_COND_NE:
- strcpy(tbuf, "bne");
+ strcpy(tbuf, "ne");
break;
case ARM_COND_LT:
- strcpy(tbuf, "blt");
+ strcpy(tbuf, "lt");
break;
case ARM_COND_GE:
- strcpy(tbuf, "bge");
+ strcpy(tbuf, "ge");
break;
case ARM_COND_GT:
- strcpy(tbuf, "bgt");
+ strcpy(tbuf, "gt");
break;
case ARM_COND_LE:
- strcpy(tbuf, "ble");
+ strcpy(tbuf, "le");
break;
case ARM_COND_CS:
- strcpy(tbuf, "bcs");
+ strcpy(tbuf, "cs");
break;
case ARM_COND_MI:
- strcpy(tbuf, "bmi");
+ strcpy(tbuf, "mi");
break;
default:
strcpy(tbuf, "");