diff options
author | Andy McFadden <fadden@android.com> | 2010-11-11 16:49:22 -0800 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2010-11-12 08:01:27 -0800 |
commit | a0929372ae4996cde3aece52f98128a957166ffc (patch) | |
tree | 2d6f810ff200c5a2812a7618beb66eb06d648a06 /vm/compiler/codegen/arm | |
parent | edb7b25cb23f40d93b11e77ae5549a676bdea7b8 (diff) | |
download | android_dalvik-a0929372ae4996cde3aece52f98128a957166ffc.tar.gz android_dalvik-a0929372ae4996cde3aece52f98128a957166ffc.tar.bz2 android_dalvik-a0929372ae4996cde3aece52f98128a957166ffc.zip |
Stop reporting negative widths.
At one point, returning a negative width for dexopt output was useful.
That stopped being the case a long time ago.
This also removes a bad assert that went into my previous checkin.
Change-Id: I18880c2316f5499a09dc479d271ca70b2a5be259
Diffstat (limited to 'vm/compiler/codegen/arm')
-rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.c | 6 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/Thumb2/Gen.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c index de0d6e6f0..17c356b98 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.c +++ b/vm/compiler/codegen/arm/CodegenDriver.c @@ -1283,8 +1283,7 @@ static void genMonitorPortable(CompilationUnit *cUnit, MIR *mir) if (isEnter) { /* Get dPC of next insn */ loadConstant(cUnit, r4PC, (int)(cUnit->method->insns + mir->offset + - dexGetInstrWidthAbs(gDvm.instrInfo.widths, - OP_MONITOR_ENTER))); + dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_ENTER))); #if defined(WITH_DEADLOCK_PREDICTION) genDispatchToHandler(cUnit, TEMPLATE_MONITOR_ENTER_DEBUG); #else @@ -1298,8 +1297,7 @@ static void genMonitorPortable(CompilationUnit *cUnit, MIR *mir) ArmLIR *branchOver = genCmpImmBranch(cUnit, kArmCondNe, r0, 0); loadConstant(cUnit, r0, (int) (cUnit->method->insns + mir->offset + - dexGetInstrWidthAbs(gDvm.instrInfo.widths, - OP_MONITOR_EXIT))); + dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_EXIT))); genDispatchToHandler(cUnit, TEMPLATE_THROW_EXCEPTION_COMMON); ArmLIR *target = newLIR0(cUnit, kArmPseudoTargetLabel); target->defMask = ENCODE_ALL; diff --git a/vm/compiler/codegen/arm/Thumb2/Gen.c b/vm/compiler/codegen/arm/Thumb2/Gen.c index 051d16d65..d6891602c 100644 --- a/vm/compiler/codegen/arm/Thumb2/Gen.c +++ b/vm/compiler/codegen/arm/Thumb2/Gen.c @@ -225,8 +225,7 @@ static void genMonitorEnter(CompilationUnit *cUnit, MIR *mir) /* Get dPC of next insn */ loadConstant(cUnit, r4PC, (int)(cUnit->method->insns + mir->offset + - dexGetInstrWidthAbs(gDvm.instrInfo.widths, - OP_MONITOR_ENTER))); + dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_ENTER))); // Export PC (part 2) newLIR3(cUnit, kThumb2StrRRI8Predec, r3, rFP, sizeof(StackSaveArea) - @@ -290,7 +289,7 @@ static void genMonitorExit(CompilationUnit *cUnit, MIR *mir) ArmLIR *branchOver = genCmpImmBranch(cUnit, kArmCondNe, r0, 0); loadConstant(cUnit, r0, (int) (cUnit->method->insns + mir->offset + - dexGetInstrWidthAbs(gDvm.instrInfo.widths, OP_MONITOR_EXIT))); + dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_EXIT))); genDispatchToHandler(cUnit, TEMPLATE_THROW_EXCEPTION_COMMON); // Resume here |