Jit: Misc fixes, move_exception, blocking mode, self-cosim
OP_MOVE_EXCEPTION handler was neglecting to reset.
Blocking mode was failing to signal empty queue in some cases
Self-cosim was including operations in traces that can't be done twice
Added OP_MOVE_EXCEPTION to self cosim's no-replay ops (it has side effects)
Restored threshold of 1 to self-cosim (now able to boot device with self-cosim)
When threshold < 6, disable 2nd-level translation filter
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 857536f..35460ed 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -208,13 +208,6 @@
}
#if defined(WITH_SELF_VERIFICATION)
-/* Prevent certain opcodes from being jitted */
-static inline bool selfVerificationPuntOps(OpCode op)
-{
- return (op == OP_MONITOR_ENTER || op == OP_MONITOR_EXIT ||
- op == OP_NEW_INSTANCE || op == OP_NEW_ARRAY);
-}
-
/*
* The following are used to keep compiled loads and stores from modifying
* memory during self verification mode.
@@ -2048,10 +2041,13 @@
int offset = offsetof(InterpState, self);
int exOffset = offsetof(Thread, exception);
int selfReg = allocTemp(cUnit);
+ int resetReg = allocTemp(cUnit);
RegLocation rlDest = getDestLoc(cUnit, mir, 0);
rlResult = evalLoc(cUnit, rlDest, kCoreReg, true);
loadWordDisp(cUnit, rGLUE, offset, selfReg);
+ loadConstant(cUnit, resetReg, 0);
loadWordDisp(cUnit, selfReg, exOffset, rlResult.lowReg);
+ storeWordDisp(cUnit, selfReg, exOffset, resetReg);
storeValue(cUnit, rlDest, rlResult);
break;
}
@@ -3882,11 +3878,6 @@
((gDvmJit.opList[dalvikOpCode >> 3] &
(1 << (dalvikOpCode & 0x7))) !=
0);
-#if defined(WITH_SELF_VERIFICATION)
- /* Punt on opcodes we can't replay */
- if (selfVerificationPuntOps(dalvikOpCode))
- singleStepMe = true;
-#endif
if (singleStepMe || cUnit->allSingleStep) {
notHandled = false;
genInterpSingleStep(cUnit, mir);