summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Cheng <bccheng@android.com>2010-05-28 15:20:08 -0700
committerBen Cheng <bccheng@android.com>2010-05-28 15:20:08 -0700
commitfc075c2d1ae63c26f96e0c6eeb72efc898dbebbf (patch)
tree0fc6f08de044cb9347ab69b884d57411f8f4d46a
parentb89bd11119b9981f4e5e4db840e580bb228f290c (diff)
downloadandroid_dalvik-fc075c2d1ae63c26f96e0c6eeb72efc898dbebbf.tar.gz
android_dalvik-fc075c2d1ae63c26f96e0c6eeb72efc898dbebbf.tar.bz2
android_dalvik-fc075c2d1ae63c26f96e0c6eeb72efc898dbebbf.zip
Clean up warnings detected by gcc.
Also re-enabled the JIT for the ARMv5te target. Change-Id: I89fd229205e30e6ee92a4933290a7d8dca001232
-rw-r--r--CleanSpec.mk1
-rw-r--r--vm/Android.mk4
-rw-r--r--vm/compiler/Loop.c50
-rw-r--r--vm/compiler/codegen/arm/CalloutHelper.h9
-rw-r--r--vm/compiler/codegen/arm/Codegen.h7
-rw-r--r--vm/compiler/codegen/arm/CodegenCommon.c2
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c3
-rw-r--r--vm/compiler/codegen/arm/LocalOptimizations.c3
-rw-r--r--vm/compiler/codegen/arm/Thumb/Factory.c3
-rw-r--r--vm/compiler/codegen/arm/Thumb/Gen.c1
-rw-r--r--vm/compiler/codegen/arm/armv5te-vfp/Codegen.c2
-rw-r--r--vm/compiler/codegen/arm/armv5te/Codegen.c2
-rw-r--r--vm/compiler/codegen/arm/armv7-a-neon/Codegen.c2
-rw-r--r--vm/compiler/codegen/arm/armv7-a/Codegen.c2
-rw-r--r--vm/mterp/c/gotoTargets.c4
-rw-r--r--vm/mterp/cstubs/stubdefs.c3
-rw-r--r--vm/mterp/out/InterpC-allstubs.c7
-rw-r--r--vm/mterp/out/InterpC-armv4t.c3
-rw-r--r--vm/mterp/out/InterpC-armv5te-vfp.c3
-rw-r--r--vm/mterp/out/InterpC-armv5te.c3
-rw-r--r--vm/mterp/out/InterpC-armv7-a-neon.c3
-rw-r--r--vm/mterp/out/InterpC-armv7-a.c3
-rw-r--r--vm/mterp/out/InterpC-portdbg.c14
-rw-r--r--vm/mterp/out/InterpC-portstd.c11
-rw-r--r--vm/mterp/out/InterpC-x86-atom.c7
-rw-r--r--vm/mterp/out/InterpC-x86.c7
-rw-r--r--vm/mterp/portable/entry.c2
-rw-r--r--vm/mterp/portable/portdbg.c6
-rw-r--r--vm/mterp/portable/portstd.c3
-rw-r--r--vm/mterp/portable/stubdefs.c2
30 files changed, 105 insertions, 67 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1b4895043..1db053d3b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -46,6 +46,7 @@
#$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
+$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/vm/Android.mk b/vm/Android.mk
index dd77dd462..14ad5ae47 100644
--- a/vm/Android.mk
+++ b/vm/Android.mk
@@ -32,10 +32,6 @@ LOCAL_PATH:= $(call my-dir)
# Build for the target (device).
#
-ifeq ($(TARGET_ARCH_VARIANT),armv5te)
- WITH_JIT := false
-endif
-
ifeq ($(TARGET_CPU_SMP),true)
target_smp_flag := -DANDROID_SMP=1
else
diff --git a/vm/compiler/Loop.c b/vm/compiler/Loop.c
index 0ceaa9f55..53daf17f5 100644
--- a/vm/compiler/Loop.c
+++ b/vm/compiler/Loop.c
@@ -86,6 +86,8 @@ static void fillPhiNodeContents(CompilationUnit *cUnit)
}
+#if 0
+/* Debugging routines */
static void dumpConstants(CompilationUnit *cUnit)
{
int i;
@@ -126,6 +128,31 @@ static void dumpIVList(CompilationUnit *cUnit)
}
}
+static void dumpHoistedChecks(CompilationUnit *cUnit)
+{
+ LoopAnalysis *loopAnalysis = cUnit->loopAnalysis;
+ unsigned int i;
+
+ for (i = 0; i < loopAnalysis->arrayAccessInfo->numUsed; i++) {
+ ArrayAccessInfo *arrayAccessInfo =
+ GET_ELEM_N(loopAnalysis->arrayAccessInfo,
+ ArrayAccessInfo*, i);
+ int arrayReg = DECODE_REG(
+ dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
+ int idxReg = DECODE_REG(
+ dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
+ LOGE("Array access %d", i);
+ LOGE(" arrayReg %d", arrayReg);
+ LOGE(" idxReg %d", idxReg);
+ LOGE(" endReg %d", loopAnalysis->endConditionReg);
+ LOGE(" maxC %d", arrayAccessInfo->maxC);
+ LOGE(" minC %d", arrayAccessInfo->minC);
+ LOGE(" opcode %d", loopAnalysis->loopBranchOpcode);
+ }
+}
+
+#endif
+
/*
* A loop is considered optimizable if:
* 1) It has one basic induction variable
@@ -347,29 +374,6 @@ static bool doLoopBodyCodeMotion(CompilationUnit *cUnit)
return !loopBodyCanThrow;
}
-static void dumpHoistedChecks(CompilationUnit *cUnit)
-{
- LoopAnalysis *loopAnalysis = cUnit->loopAnalysis;
- unsigned int i;
-
- for (i = 0; i < loopAnalysis->arrayAccessInfo->numUsed; i++) {
- ArrayAccessInfo *arrayAccessInfo =
- GET_ELEM_N(loopAnalysis->arrayAccessInfo,
- ArrayAccessInfo*, i);
- int arrayReg = DECODE_REG(
- dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
- int idxReg = DECODE_REG(
- dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
- LOGE("Array access %d", i);
- LOGE(" arrayReg %d", arrayReg);
- LOGE(" idxReg %d", idxReg);
- LOGE(" endReg %d", loopAnalysis->endConditionReg);
- LOGE(" maxC %d", arrayAccessInfo->maxC);
- LOGE(" minC %d", arrayAccessInfo->minC);
- LOGE(" opcode %d", loopAnalysis->loopBranchOpcode);
- }
-}
-
static void genHoistedChecks(CompilationUnit *cUnit)
{
unsigned int i;
diff --git a/vm/compiler/codegen/arm/CalloutHelper.h b/vm/compiler/codegen/arm/CalloutHelper.h
index f6d5f4efc..d6eb421c9 100644
--- a/vm/compiler/codegen/arm/CalloutHelper.h
+++ b/vm/compiler/codegen/arm/CalloutHelper.h
@@ -80,9 +80,12 @@ ArrayObject* dvmAllocArrayByClass(ClassObject* arrayClass, // OP_NEW_ARRAY
bool dvmInterpHandleFillArrayData(ArrayObject* arrayObject,// OP_FILL_ARRAY_DATA
const u2* arrayData);
-/* Switch dispatch offset calculation for OP_PACKED_SWITCH & OP_SPARSE_SWITCH */
-static s8 findPackedSwitchIndex(const u2* switchData, int testVal, int pc);
-static s8 findSparseSwitchIndex(const u2* switchData, int testVal, int pc);
+/*
+ * Switch dispatch offset calculation for OP_PACKED_SWITCH & OP_SPARSE_SWITCH
+ * Used in CodegenDriver.c
+ * static s8 findPackedSwitchIndex(const u2* switchData, int testVal, int pc);
+ * static s8 findSparseSwitchIndex(const u2* switchData, int testVal, int pc);
+ */
/*
* Resolve interface callsites - OP_INVOKE_INTERFACE & OP_INVOKE_INTERFACE_RANGE
diff --git a/vm/compiler/codegen/arm/Codegen.h b/vm/compiler/codegen/arm/Codegen.h
index da65bb5d3..ca0a843be 100644
--- a/vm/compiler/codegen/arm/Codegen.h
+++ b/vm/compiler/codegen/arm/Codegen.h
@@ -25,6 +25,7 @@
#include "compiler/CompilerIR.h"
#include "CalloutHelper.h"
+#if defined(_CODEGEN_C)
/*
* loadConstant() sometimes needs to add a small imm to a pre-existing constant
*/
@@ -44,10 +45,16 @@ static bool genArithOpDoublePortable(CompilationUnit *cUnit, MIR *mir,
static bool genConversionPortable(CompilationUnit *cUnit, MIR *mir);
+#if defined(WITH_DEADLOCK_PREDICTION) || defined(WITH_MONITOR_TRACKING) || \
+ defined(__ARM_ARCH_5__)
static void genMonitorPortable(CompilationUnit *cUnit, MIR *mir);
+#endif
static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir);
+#endif
+
+
#if defined(WITH_SELF_VERIFICATION)
/* Self Verification memory instruction decoder */
void dvmSelfVerificationMemOpDecode(int lr, int* sp);
diff --git a/vm/compiler/codegen/arm/CodegenCommon.c b/vm/compiler/codegen/arm/CodegenCommon.c
index 0cec99df8..d8854ba4f 100644
--- a/vm/compiler/codegen/arm/CodegenCommon.c
+++ b/vm/compiler/codegen/arm/CodegenCommon.c
@@ -256,6 +256,7 @@ static ArmLIR *newLIR3(CompilationUnit *cUnit, ArmOpCode opCode,
return insn;
}
+#if defined(_ARMV7_A) || defined(_ARMV7_A_NEON)
static ArmLIR *newLIR4(CompilationUnit *cUnit, ArmOpCode opCode,
int dest, int src1, int src2, int info)
{
@@ -271,6 +272,7 @@ static ArmLIR *newLIR4(CompilationUnit *cUnit, ArmOpCode opCode,
dvmCompilerAppendLIR(cUnit, (LIR *) insn);
return insn;
}
+#endif
/*
* If the next instruction is a move-result or move-result-long,
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index f625771ec..dbb85c9b2 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -1214,6 +1214,8 @@ static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir)
opReg(cUnit, kOpBlx, r2);
}
+#if defined(WITH_DEADLOCK_PREDICTION) || defined(WITH_MONITOR_TRACKING) || \
+ defined(_ARMV5TE) || defined(_ARMV5TE_VFP)
/*
* To prevent a thread in a monitor wait from blocking the Jit from
* resetting the code cache, heavyweight monitor lock will not
@@ -1259,6 +1261,7 @@ static void genMonitorPortable(CompilationUnit *cUnit, MIR *mir)
dvmCompilerClobberCallRegs(cUnit);
}
}
+#endif
/*
* The following are the first-level codegen routines that analyze the format
diff --git a/vm/compiler/codegen/arm/LocalOptimizations.c b/vm/compiler/codegen/arm/LocalOptimizations.c
index 729486cdc..724fdb7ad 100644
--- a/vm/compiler/codegen/arm/LocalOptimizations.c
+++ b/vm/compiler/codegen/arm/LocalOptimizations.c
@@ -50,6 +50,8 @@ static inline bool isDalvikRegisterClobbered(ArmLIR *lir1, ArmLIR *lir2)
return (reg1Lo == reg2Lo) || (reg1Lo == reg2Hi) || (reg1Hi == reg2Lo);
}
+#if 0
+/* Debugging utility routine */
static void dumpDependentInsnPair(ArmLIR *thisLIR, ArmLIR *checkLIR,
const char *optimization)
{
@@ -57,6 +59,7 @@ static void dumpDependentInsnPair(ArmLIR *thisLIR, ArmLIR *checkLIR,
dvmDumpLIRInsn((LIR *) thisLIR, 0);
dvmDumpLIRInsn((LIR *) checkLIR, 0);
}
+#endif
/*
* Perform a pass of top-down walk to
diff --git a/vm/compiler/codegen/arm/Thumb/Factory.c b/vm/compiler/codegen/arm/Thumb/Factory.c
index 4c010c619..85f612ec0 100644
--- a/vm/compiler/codegen/arm/Thumb/Factory.c
+++ b/vm/compiler/codegen/arm/Thumb/Factory.c
@@ -23,7 +23,6 @@
*/
static int coreTemps[] = {r0, r1, r2, r3, r4PC, r7};
-static int corePreserved[] = {};
static void storePair(CompilationUnit *cUnit, int base, int lowReg,
int highReg);
@@ -569,7 +568,6 @@ static ArmLIR *loadBaseDispBody(CompilationUnit *cUnit, MIR *mir, int rBase,
ArmLIR *load2 = NULL;
ArmOpCode opCode = kThumbBkpt;
bool shortForm = false;
- int shortMax = 128;
int encodedDisp = displacement;
bool pair = false;
@@ -700,7 +698,6 @@ static ArmLIR *storeBaseDispBody(CompilationUnit *cUnit, int rBase,
ArmLIR *store2 = NULL;
ArmOpCode opCode = kThumbBkpt;
bool shortForm = false;
- int shortMax = 128;
int encodedDisp = displacement;
bool pair = false;
diff --git a/vm/compiler/codegen/arm/Thumb/Gen.c b/vm/compiler/codegen/arm/Thumb/Gen.c
index e01479505..37cc18d97 100644
--- a/vm/compiler/codegen/arm/Thumb/Gen.c
+++ b/vm/compiler/codegen/arm/Thumb/Gen.c
@@ -112,7 +112,6 @@ static void genLong3Addr(CompilationUnit *cUnit, MIR *mir, OpKind firstOp,
void dvmCompilerInitializeRegAlloc(CompilationUnit *cUnit)
{
- int i;
int numTemps = sizeof(coreTemps)/sizeof(int);
RegisterPool *pool = dvmCompilerNew(sizeof(*pool), true);
cUnit->regPool = pool;
diff --git a/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c b/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
index 04bb3a2b7..3b0390185 100644
--- a/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
+++ b/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define _CODEGEN_C
+#define _ARMV5TE_VFP
#include "Dalvik.h"
#include "interp/InterpDefs.h"
diff --git a/vm/compiler/codegen/arm/armv5te/Codegen.c b/vm/compiler/codegen/arm/armv5te/Codegen.c
index 5e53ae4e4..1d9ee6d90 100644
--- a/vm/compiler/codegen/arm/armv5te/Codegen.c
+++ b/vm/compiler/codegen/arm/armv5te/Codegen.c
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define _CODEGEN_C
+#define _ARMV5TE
#include "Dalvik.h"
#include "interp/InterpDefs.h"
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c b/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
index baa96323a..305d10384 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
+++ b/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define _CODEGEN_C
+#define _ARMV7_A_NEON
#include "Dalvik.h"
#include "interp/InterpDefs.h"
diff --git a/vm/compiler/codegen/arm/armv7-a/Codegen.c b/vm/compiler/codegen/arm/armv7-a/Codegen.c
index baa96323a..0f646947f 100644
--- a/vm/compiler/codegen/arm/armv7-a/Codegen.c
+++ b/vm/compiler/codegen/arm/armv7-a/Codegen.c
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define _CODEGEN_C
+#define _ARMV7_A
#include "Dalvik.h"
#include "interp/InterpDefs.h"
diff --git a/vm/mterp/c/gotoTargets.c b/vm/mterp/c/gotoTargets.c
index 9d7212f10..acbde1c4d 100644
--- a/vm/mterp/c/gotoTargets.c
+++ b/vm/mterp/c/gotoTargets.c
@@ -544,7 +544,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -919,7 +919,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/cstubs/stubdefs.c b/vm/mterp/cstubs/stubdefs.c
index 5a8d58541..bf870c678 100644
--- a/vm/mterp/cstubs/stubdefs.c
+++ b/vm/mterp/cstubs/stubdefs.c
@@ -2,7 +2,8 @@
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index ea1de0720..11c1d0956 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
@@ -3671,7 +3672,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -4046,7 +4047,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/out/InterpC-armv4t.c b/vm/mterp/out/InterpC-armv4t.c
index 76c8664e7..55a020d29 100644
--- a/vm/mterp/out/InterpC-armv4t.c
+++ b/vm/mterp/out/InterpC-armv4t.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.c b/vm/mterp/out/InterpC-armv5te-vfp.c
index a991c2bd0..8e58f8b6d 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.c
+++ b/vm/mterp/out/InterpC-armv5te-vfp.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-armv5te.c b/vm/mterp/out/InterpC-armv5te.c
index 21ed40877..d3c041fda 100644
--- a/vm/mterp/out/InterpC-armv5te.c
+++ b/vm/mterp/out/InterpC-armv5te.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.c b/vm/mterp/out/InterpC-armv7-a-neon.c
index a9de36ff7..77b1fce54 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.c
+++ b/vm/mterp/out/InterpC-armv7-a-neon.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-armv7-a.c b/vm/mterp/out/InterpC-armv7-a.c
index 3dfca567e..7f46f4f4a 100644
--- a/vm/mterp/out/InterpC-armv7-a.c
+++ b/vm/mterp/out/InterpC-armv7-a.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index bcc6b9951..6d9de4a33 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -425,10 +425,12 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
checkDebugAndProf(pc, fp, self, curMethod, &debugIsMethodEntry)
#if defined(WITH_JIT)
-#define CHECK_JIT() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_BOOL() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_VOID() (dvmCheckJit(pc, self, interpState))
#define ABORT_JIT_TSELECT() (dvmJitAbortTraceSelect(interpState))
#else
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT(x) ((void)0)
#endif
@@ -465,7 +467,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
inst = FETCH(0); \
CHECK_DEBUG_AND_PROF(); \
CHECK_TRACKED_REFS(); \
- if (CHECK_JIT()) GOTO_bail_switch(); \
+ if (CHECK_JIT_BOOL()) GOTO_bail_switch(); \
goto *handlerTable[INST_INST(inst)]; \
}
# define FINISH_BKPT(_opcode) { \
@@ -1543,7 +1545,7 @@ bool INTERP_FUNC_NAME(Thread* self, InterpState* interpState)
/* just fall through to instruction loop or threaded kickstart */
break;
case kInterpEntryReturn:
- CHECK_JIT();
+ CHECK_JIT_VOID();
goto returnFromMethod;
case kInterpEntryThrow:
goto exceptionThrown;
@@ -3954,7 +3956,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -4329,7 +4331,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 1937bd1a8..bedb001ba 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -423,7 +423,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define CHECK_DEBUG_AND_PROF() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/* File: portable/stubdefs.c */
@@ -459,7 +460,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
inst = FETCH(0); \
CHECK_DEBUG_AND_PROF(); \
CHECK_TRACKED_REFS(); \
- if (CHECK_JIT()) GOTO_bail_switch(); \
+ if (CHECK_JIT_BOOL()) GOTO_bail_switch(); \
goto *handlerTable[INST_INST(inst)]; \
}
# define FINISH_BKPT(_opcode) { \
@@ -1282,7 +1283,7 @@ bool INTERP_FUNC_NAME(Thread* self, InterpState* interpState)
/* just fall through to instruction loop or threaded kickstart */
break;
case kInterpEntryReturn:
- CHECK_JIT();
+ CHECK_JIT_VOID();
goto returnFromMethod;
case kInterpEntryThrow:
goto exceptionThrown;
@@ -3693,7 +3694,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -4068,7 +4069,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/out/InterpC-x86-atom.c b/vm/mterp/out/InterpC-x86-atom.c
index 4ee71812e..0061a61ec 100644
--- a/vm/mterp/out/InterpC-x86-atom.c
+++ b/vm/mterp/out/InterpC-x86-atom.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
@@ -1839,7 +1840,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -2214,7 +2215,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/out/InterpC-x86.c b/vm/mterp/out/InterpC-x86.c
index ecbb6147d..c95ef905e 100644
--- a/vm/mterp/out/InterpC-x86.c
+++ b/vm/mterp/out/InterpC-x86.c
@@ -422,7 +422,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
#define INTERP_TYPE INTERP_STD
#define CHECK_DEBUG_AND_PROF() ((void)0)
# define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
/*
@@ -1808,7 +1809,7 @@ GOTO_TARGET(returnFromMethod)
LOGVV("+++ returned into break frame\n");
#if defined(WITH_JIT)
/* Let the Jit know the return is terminating normally */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
GOTO_bail();
}
@@ -2183,7 +2184,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
#if defined(WITH_JIT)
/* Allow the Jit to end any pending trace building */
- CHECK_JIT();
+ CHECK_JIT_VOID();
#endif
/*
diff --git a/vm/mterp/portable/entry.c b/vm/mterp/portable/entry.c
index 2aa78678e..b2ec1d843 100644
--- a/vm/mterp/portable/entry.c
+++ b/vm/mterp/portable/entry.c
@@ -97,7 +97,7 @@ bool INTERP_FUNC_NAME(Thread* self, InterpState* interpState)
/* just fall through to instruction loop or threaded kickstart */
break;
case kInterpEntryReturn:
- CHECK_JIT();
+ CHECK_JIT_VOID();
goto returnFromMethod;
case kInterpEntryThrow:
goto exceptionThrown;
diff --git a/vm/mterp/portable/portdbg.c b/vm/mterp/portable/portdbg.c
index 030a515e0..76b7637fe 100644
--- a/vm/mterp/portable/portdbg.c
+++ b/vm/mterp/portable/portdbg.c
@@ -5,9 +5,11 @@
checkDebugAndProf(pc, fp, self, curMethod, &debugIsMethodEntry)
#if defined(WITH_JIT)
-#define CHECK_JIT() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_BOOL() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_VOID() (dvmCheckJit(pc, self, interpState))
#define ABORT_JIT_TSELECT() (dvmJitAbortTraceSelect(interpState))
#else
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT(x) ((void)0)
#endif
diff --git a/vm/mterp/portable/portstd.c b/vm/mterp/portable/portstd.c
index e2d8b100b..f37c22b60 100644
--- a/vm/mterp/portable/portstd.c
+++ b/vm/mterp/portable/portstd.c
@@ -3,5 +3,6 @@
#define CHECK_DEBUG_AND_PROF() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
#define ABORT_JIT_TSELECT() ((void)0)
diff --git a/vm/mterp/portable/stubdefs.c b/vm/mterp/portable/stubdefs.c
index 29258fc65..b46bb3a0f 100644
--- a/vm/mterp/portable/stubdefs.c
+++ b/vm/mterp/portable/stubdefs.c
@@ -30,7 +30,7 @@
inst = FETCH(0); \
CHECK_DEBUG_AND_PROF(); \
CHECK_TRACKED_REFS(); \
- if (CHECK_JIT()) GOTO_bail_switch(); \
+ if (CHECK_JIT_BOOL()) GOTO_bail_switch(); \
goto *handlerTable[INST_INST(inst)]; \
}
# define FINISH_BKPT(_opcode) { \