diff options
| author | Ben Cheng <bccheng@android.com> | 2010-04-02 15:58:56 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-02 15:58:56 -0700 |
| commit | b3921ff9c1282346b053ebbd92bf284d875526d2 (patch) | |
| tree | 2c82a4c432f9155c50ea9e10dc8aca8a8fdf7857 /vm/compiler/codegen/arm/CodegenDriver.c | |
| parent | 0c16921732a3c24458789edfde2cfd9598b675fb (diff) | |
| parent | d5adae17d71e86a1a5f3ae7825054e3249fb7879 (diff) | |
am d5adae17: Improve JIT self verifier test coverage to follow single-step instructions.
Merge commit 'd5adae17d71e86a1a5f3ae7825054e3249fb7879' into dalvik-dev
* commit 'd5adae17d71e86a1a5f3ae7825054e3249fb7879':
Improve JIT self verifier test coverage to follow single-step instructions.
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 0720478c0..aa2e63492 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.c +++ b/vm/compiler/codegen/arm/CodegenDriver.c @@ -3517,6 +3517,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 */ @@ -3715,6 +3735,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); |
