diff options
author | Bill Buzbee <buzbee@google.com> | 2009-08-27 13:58:09 -0700 |
---|---|---|
committer | Bill Buzbee <buzbee@google.com> | 2009-08-28 10:21:47 -0700 |
commit | a4a7f0708e75eefae8cf9fff3f9e15699f7881be (patch) | |
tree | 3ed197140e5e5efc6203ca9555fed27683081d1f /vm/compiler/codegen/arm/ArchUtility.c | |
parent | 06566d20700820a62c8793858e359ed643ab7b1e (diff) | |
download | android_dalvik-a4a7f0708e75eefae8cf9fff3f9e15699f7881be.tar.gz android_dalvik-a4a7f0708e75eefae8cf9fff3f9e15699f7881be.tar.bz2 android_dalvik-a4a7f0708e75eefae8cf9fff3f9e15699f7881be.zip |
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.
Diffstat (limited to 'vm/compiler/codegen/arm/ArchUtility.c')
-rw-r--r-- | vm/compiler/codegen/arm/ArchUtility.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/vm/compiler/codegen/arm/ArchUtility.c b/vm/compiler/codegen/arm/ArchUtility.c index eeee00b4d..3d55abda8 100644 --- a/vm/compiler/codegen/arm/ArchUtility.c +++ b/vm/compiler/codegen/arm/ArchUtility.c @@ -82,6 +82,13 @@ static void buildInsnString(char *fmt, ArmLIR *lir, char* buf, 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 @@ static void buildInsnString(char *fmt, ArmLIR *lir, char* buf, 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, ""); |