test/TestHash.c \
test/TestIndirectRefTable.c
-ifeq ($(WITH_JIT_TUNING),true)
- LOCAL_CFLAGS += -DWITH_JIT_TUNING
-endif
+WITH_JIT := $(strip $(WITH_JIT))
ifeq ($(WITH_JIT),true)
- # NOTE: Turn on assertion for JIT for now
- LOCAL_CFLAGS += -DWITH_DALVIK_ASSERT
- # NOTE: Also turn on tuning when JIT is enabled for now
- LOCAL_CFLAGS += -DWITH_JIT_TUNING
LOCAL_CFLAGS += -DWITH_JIT
+ # Enable assert and JIT_TUNING for now
+ LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT
+ WITH_JIT_TUNING := true
LOCAL_SRC_FILES += \
../dexdump/OpCodeNames.c \
compiler/Compiler.c \
interp/Jit.c
endif
+ifeq ($(strip $(WITH_JIT_TUNING)),true)
+ LOCAL_CFLAGS += -DWITH_JIT_TUNING
+endif
+
WITH_HPROF := $(strip $(WITH_HPROF))
ifeq ($(WITH_HPROF),)
WITH_HPROF := true
ArmLIR *retChainingCell = &labelList[bb->fallThrough->id];
/* r1 = &retChainingCell */
- ArmLIR *addrRetChain = newLIR3(cUnit, THUMB_ADD_PC_REL,
- r1, 0, 0);
+ ArmLIR *addrRetChain = newLIR3(cUnit, THUMB_ADD_PC_REL, r1, 0, 0);
/* r4PC = dalvikCallsite */
loadConstant(cUnit, r4PC,
(int) (cUnit->method->insns + mir->offset));
(int) (cUnit->method->insns + mir->offset));
/* r1 = &retChainingCell */
- ArmLIR *addrRetChain = newLIR2(cUnit, THUMB_ADD_PC_REL,
- r1, 0);
+ ArmLIR *addrRetChain = newLIR3(cUnit, THUMB_ADD_PC_REL, r1, 0, 0);
addrRetChain->generic.target = (LIR *) retChainingCell;
/* r2 = &predictedChainingCell */
- ArmLIR *predictedChainingCell =
- newLIR2(cUnit, THUMB_ADD_PC_REL, r2, 0);
+ ArmLIR *predictedChainingCell = newLIR3(cUnit, THUMB_ADD_PC_REL, r2, 0, 0);
predictedChainingCell->generic.target = (LIR *) predChainingCell;
genDispatchToHandler(cUnit, TEMPLATE_INVOKE_METHOD_PREDICTED_CHAIN);
(int) (cUnit->method->insns + mir->offset));
/* r1 = &retChainingCell */
- ArmLIR *addrRetChain = newLIR2(cUnit, THUMB_ADD_PC_REL,
- r1, 0);
+ ArmLIR *addrRetChain = newLIR3(cUnit, THUMB_ADD_PC_REL, r1, 0, 0);
addrRetChain->generic.target = (LIR *) retChainingCell;
/* r2 = &predictedChainingCell */
ArmLIR *predictedChainingCell =
- newLIR2(cUnit, THUMB_ADD_PC_REL, r2, 0);
+ newLIR3(cUnit, THUMB_ADD_PC_REL, r2, 0, 0);
predictedChainingCell->generic.target = (LIR *) predChainingCell;
genDispatchToHandler(cUnit, TEMPLATE_INVOKE_METHOD_PREDICTED_CHAIN);
if (res && gDvm.executionMode == kExecutionModeJit) {
JitEntry *pJitTable = NULL;
unsigned char *pJitProfTable = NULL;
- assert(gDvm.jitTableSize &&
- !(gDvm.jitTableSize & (gDvmJit.jitTableSize - 1))); // Power of 2?
+ // Power of 2?
+ assert(gDvmJit.jitTableSize &&
+ !(gDvmJit.jitTableSize & (gDvmJit.jitTableSize - 1)));
dvmLockMutex(&gDvmJit.tableLock);
pJitTable = (JitEntry*)
calloc(gDvmJit.jitTableSize, sizeof(*pJitTable));
pJitTable[i].u.info.chain = gDvmJit.jitTableSize;
}
/* Is chain field wide enough for termination pattern? */
- assert(pJitTable[0].u.info.chain == gDvm.maxJitTableEntries);
+ assert(pJitTable[0].u.info.chain == gDvmJit.jitTableSize);
done:
gDvmJit.pJitEntryTable = pJitTable;
unsigned int oldSize;
unsigned int i;
- assert(gDvm.pJitEntryTable != NULL);
+ assert(gDvmJit.pJitEntryTable != NULL);
assert(size && !(size & (size - 1))); /* Is power of 2? */
LOGD("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size);