diff options
| author | Ben Cheng <bccheng@android.com> | 2010-03-26 17:45:28 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@android.com> | 2010-03-26 17:45:28 -0700 |
| commit | d5adae17d71e86a1a5f3ae7825054e3249fb7879 (patch) | |
| tree | ce06f5c39bb5b35a960612cda0eb95a66099c360 /vm/compiler/codegen/arm/CodegenDriver.c | |
| parent | 8812fdd711c64cfa4d634fd10ad9f103731aa8e0 (diff) | |
Improve JIT self verifier test coverage to follow single-step instructions.
Bug: 2549326
Change-Id: I01412d4aac1379b61c90fe6e59c534b33be93f66
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
| -rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c index 54a506007..e3ac5bb04 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.c +++ b/vm/compiler/codegen/arm/CodegenDriver.c @@ -3511,6 +3511,26 @@ static void setupLoopEntryBlock(CompilationUnit *cUnit, BasicBlock *entry, cUnit->loopAnalysis->branchToPCR = (LIR *) branchToPCR; } +#if defined(WITH_SELF_VERIFICATION) +static bool selfVerificationPuntOps(MIR *mir) +{ + DecodedInstruction *decInsn = &mir->dalvikInsn; + OpCode op = decInsn->opCode; + int flags = dexGetInstrFlags(gDvm.instrFlags, op); + /* + * All opcodes that can throw exceptions and use the + * TEMPLATE_THROW_EXCEPTION_COMMON template should be excluded in the trace + * under self-verification mode. + */ + return (op == OP_MONITOR_ENTER || op == OP_MONITOR_EXIT || + op == OP_NEW_INSTANCE || op == OP_NEW_ARRAY || + op == OP_CHECK_CAST || op == OP_MOVE_EXCEPTION || + op == OP_FILL_ARRAY_DATA || op == OP_EXECUTE_INLINE || + op == OP_EXECUTE_INLINE_RANGE || + (flags & kInstrInvoke)); +} +#endif + void dvmCompilerMIR2LIR(CompilationUnit *cUnit) { /* Used to hold the labels of each block */ @@ -3709,6 +3729,11 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) ((gDvmJit.opList[dalvikOpCode >> 3] & (1 << (dalvikOpCode & 0x7))) != 0); +#if defined(WITH_SELF_VERIFICATION) + if (singleStepMe == false) { + singleStepMe = selfVerificationPuntOps(mir); + } +#endif if (singleStepMe || cUnit->allSingleStep) { notHandled = false; genInterpSingleStep(cUnit, mir); |
