summaryrefslogtreecommitdiffstats
path: root/vm/compiler/codegen/x86
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2010-12-14 11:06:25 -0800
committerbuzbee <buzbee@google.com>2010-12-14 11:06:25 -0800
commit13fbc2e4bfa04cce8e181ac37d7f2b13a54aa037 (patch)
tree0f8e4079d02b70418b1469f9b6d32b2b6838e6d9 /vm/compiler/codegen/x86
parent00603079b8723b32c955513eae63a8f97898074d (diff)
downloadandroid_dalvik-13fbc2e4bfa04cce8e181ac37d7f2b13a54aa037.tar.gz
android_dalvik-13fbc2e4bfa04cce8e181ac37d7f2b13a54aa037.tar.bz2
android_dalvik-13fbc2e4bfa04cce8e181ac37d7f2b13a54aa037.zip
Stamp out some x86/host mode warnings
Nuked a void* cast warnings and moved cacheflush into a target-specific utility wrapper. Change-Id: I36c841288b9ec7e03c0cb29b2e89db344f36fad1
Diffstat (limited to 'vm/compiler/codegen/x86')
-rw-r--r--vm/compiler/codegen/x86/ArchUtility.c6
-rw-r--r--vm/compiler/codegen/x86/Assemble.c1
-rw-r--r--vm/compiler/codegen/x86/CodegenDriver.c9
3 files changed, 13 insertions, 3 deletions
diff --git a/vm/compiler/codegen/x86/ArchUtility.c b/vm/compiler/codegen/x86/ArchUtility.c
index 171c3b5ef..f7c48d628 100644
--- a/vm/compiler/codegen/x86/ArchUtility.c
+++ b/vm/compiler/codegen/x86/ArchUtility.c
@@ -22,3 +22,9 @@
void dvmCompilerCodegenDump(CompilationUnit *cUnit)
{
}
+
+/* Target-specific cache flushing (not needed for x86 */
+int dvmCompilerCacheFlush(long start, long end, long flags)
+{
+ return 0;
+}
diff --git a/vm/compiler/codegen/x86/Assemble.c b/vm/compiler/codegen/x86/Assemble.c
index 31264ce64..3c0b3c7d6 100644
--- a/vm/compiler/codegen/x86/Assemble.c
+++ b/vm/compiler/codegen/x86/Assemble.c
@@ -20,7 +20,6 @@
#include "../../CompilerInternals.h"
#include "X86LIR.h"
#include "Codegen.h"
-#include <unistd.h> /* for cacheflush */
#include <sys/mman.h> /* for protection change */
#define MAX_ASSEMBLER_RETRIES 10
diff --git a/vm/compiler/codegen/x86/CodegenDriver.c b/vm/compiler/codegen/x86/CodegenDriver.c
index 4a5d481b9..4f31563ea 100644
--- a/vm/compiler/codegen/x86/CodegenDriver.c
+++ b/vm/compiler/codegen/x86/CodegenDriver.c
@@ -35,6 +35,7 @@ extern X86LIR *opReg(CompilationUnit *cUnit, OpKind op, int rDestSrc);
static int opcodeCoverage[kNumPackedOpcodes];
static intptr_t templateEntryOffsets[TEMPLATE_LAST_MARK];
+#if 0 // Avoid compiler warnings when x86 disabled during development
/*
* Bail to the interpreter. Will not return to this trace.
* On entry, rPC must be set correctly.
@@ -79,6 +80,7 @@ static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir)
storeWordDisp(cUnit, rESP, OUT_ARG0, rECX);
opReg(cUnit, kOpCall, rEAX);
}
+#endif
/*
* The following are the first-level codegen routines that analyze the format
@@ -211,6 +213,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit)
/* Accept the work and start compiling */
bool dvmCompilerDoWork(CompilerWorkOrder *work)
{
+ JitTraceDescription *desc;
bool res;
if (gDvmJit.codeCacheFull) {
@@ -220,14 +223,16 @@ bool dvmCompilerDoWork(CompilerWorkOrder *work)
switch (work->kind) {
case kWorkOrderTrace:
/* Start compilation with maximally allowed trace length */
- res = dvmCompileTrace(work->info, JIT_MAX_TRACE_LEN, &work->result,
+ desc = (JitTraceDescription *)work->info;
+ res = dvmCompileTrace(desc, JIT_MAX_TRACE_LEN, &work->result,
work->bailPtr, 0 /* no hints */);
break;
case kWorkOrderTraceDebug: {
bool oldPrintMe = gDvmJit.printMe;
gDvmJit.printMe = true;
/* Start compilation with maximally allowed trace length */
- res = dvmCompileTrace(work->info, JIT_MAX_TRACE_LEN, &work->result,
+ desc = (JitTraceDescription *)work->info;
+ res = dvmCompileTrace(desc, JIT_MAX_TRACE_LEN, &work->result,
work->bailPtr, 0 /* no hints */);
gDvmJit.printMe = oldPrintMe;
break;