aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/CodegenDriver.c
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2010-11-19 12:36:19 -0800
committerDan Bornstein <danfuzz@android.com>2010-11-19 12:36:19 -0800
commit41e286c0623dcb4efc6243c94ba14e7febed4b25 (patch)
tree0913ea0ac7a342fceb9ee5d60c5ff26af8381850 /vm/compiler/codegen/arm/CodegenDriver.c
parent1bf27827da214984d84febe187899969457bfb31 (diff)
Get rid of the copies of the opcode table pointers.
This inclduded fixing all the accessor functions to refer to the global ones defined in InstrUtils.[ch] instead of taking separate "table pointer" arguments. This did end up adding a few more truly global references to some of the code paths, particularly when performing dex optimization, so I went ahead and measured the time to do a cold first-boot both before and after the change (on real hardware). The times were identical (to one-second granularity), so I'm reasonably comfortable making this change. Change-Id: I604d9f7882bad4245bb11371218d13b06c3a5375
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 17c356b98..8e1d9a2d8 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -1233,7 +1233,7 @@ static void genPuntToInterp(CompilationUnit *cUnit, unsigned int offset)
*/
static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir)
{
- int flags = dexGetInstrFlags(gDvm.instrInfo.flags, mir->dalvikInsn.opCode);
+ int flags = dexGetInstrFlags(mir->dalvikInsn.opCode);
int flagsToCheck = kInstrCanBranch | kInstrCanSwitch | kInstrCanReturn |
kInstrCanThrow;
@@ -1283,7 +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 +
- dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_ENTER)));
+ dexGetInstrWidth(OP_MONITOR_ENTER)));
#if defined(WITH_DEADLOCK_PREDICTION)
genDispatchToHandler(cUnit, TEMPLATE_MONITOR_ENTER_DEBUG);
#else
@@ -1297,7 +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 +
- dexGetInstrWidth(gDvm.instrInfo.widths, OP_MONITOR_EXIT)));
+ dexGetInstrWidth(OP_MONITOR_EXIT)));
genDispatchToHandler(cUnit, TEMPLATE_THROW_EXCEPTION_COMMON);
ArmLIR *target = newLIR0(cUnit, kArmPseudoTargetLabel);
target->defMask = ENCODE_ALL;
@@ -4097,8 +4097,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit)
OpCode dalvikOpCode = mir->dalvikInsn.opCode;
- InstructionFormat dalvikFormat =
- dexGetInstrFormat(gDvm.instrInfo.formats, dalvikOpCode);
+ InstructionFormat dalvikFormat = dexGetInstrFormat(dalvikOpCode);
char *note;
if (mir->OptimizationFlags & MIR_INLINED) {
note = " (I)";