summaryrefslogtreecommitdiffstats
path: root/vm/mterp
diff options
context:
space:
mode:
authorChris Dearman <chris@mips.com>2012-01-31 17:19:49 -0800
committerRaghu Gandham <raghu@mips.com>2012-02-15 10:33:36 -0800
commit75425b731c514bf90c985275d80aa7886727d83f (patch)
tree7352e39b7ba3d87b190f536e65eef63905538ae1 /vm/mterp
parentc1052f9a61539f212885555b0b2c110582f11e28 (diff)
downloadandroid_dalvik-75425b731c514bf90c985275d80aa7886727d83f.tar.gz
android_dalvik-75425b731c514bf90c985275d80aa7886727d83f.tar.bz2
android_dalvik-75425b731c514bf90c985275d80aa7886727d83f.zip
Fix the portable interpreter build
Change-Id: Ibf08d50c7a01a4c30559dd2ee9511c28fb1365a5 Signed-off-by: Chris Dearman <chris@mips.com>
Diffstat (limited to 'vm/mterp')
-rw-r--r--vm/mterp/Mterp.h10
-rw-r--r--vm/mterp/cstubs/entry.cpp12
-rw-r--r--vm/mterp/cstubs/stubdefs.cpp4
-rw-r--r--vm/mterp/out/InterpC-allstubs.cpp16
-rw-r--r--vm/mterp/out/InterpC-armv5te-vfp.cpp4
-rw-r--r--vm/mterp/out/InterpC-armv5te.cpp4
-rw-r--r--vm/mterp/out/InterpC-armv7-a-neon.cpp4
-rw-r--r--vm/mterp/out/InterpC-armv7-a.cpp4
-rw-r--r--vm/mterp/out/InterpC-x86-atom.cpp4
-rw-r--r--vm/mterp/out/InterpC-x86.cpp4
10 files changed, 38 insertions, 28 deletions
diff --git a/vm/mterp/Mterp.h b/vm/mterp/Mterp.h
index b27e4f7a7..6762f6726 100644
--- a/vm/mterp/Mterp.h
+++ b/vm/mterp/Mterp.h
@@ -35,15 +35,9 @@ extern "C" bool dvmCheckAsmConstants(void);
/*
* Local entry and exit points. The platform-specific implementation must
* provide these two.
- *
- * dvmMterpStdRun() returns the "changeInterp" argument from dvmMterpStdBail(),
- * indicating whether we want to bail out of the interpreter or just switch
- * between "standard" and "debug" mode.
- *
- * The "mterp" interpreter is always "standard".
*/
-extern "C" bool dvmMterpStdRun(Thread* self);
-extern "C" void dvmMterpStdBail(Thread* self, bool changeInterp);
+extern "C" void dvmMterpStdRun(Thread* self);
+extern "C" void dvmMterpStdBail(Thread* self);
/*
* Helper for common_printMethod(), invoked from the assembly
diff --git a/vm/mterp/cstubs/entry.cpp b/vm/mterp/cstubs/entry.cpp
index 350bd8603..90b6ceab2 100644
--- a/vm/mterp/cstubs/entry.cpp
+++ b/vm/mterp/cstubs/entry.cpp
@@ -2,7 +2,7 @@
* Handler function table, one entry per opcode.
*/
#undef H
-#define H(_op) dvmMterp_##_op
+#define H(_op) (const void*) dvmMterp_##_op
DEFINE_GOTO_TABLE(gDvmMterpHandlers)
#undef H
@@ -21,12 +21,12 @@ void dvmMterpStdRun(Thread* self)
{
jmp_buf jmpBuf;
- self->bailPtr = &jmpBuf;
+ self->interpSave.bailPtr = &jmpBuf;
/* We exit via a longjmp */
if (setjmp(jmpBuf)) {
LOGVV("mterp threadid=%d returning", dvmThreadSelf()->threadId);
- return
+ return;
}
/* run until somebody longjmp()s out */
@@ -40,8 +40,8 @@ void dvmMterpStdRun(Thread* self)
* FINISH code. For allstubs, we must do an explicit check
* in the interpretation loop.
*/
- if (self-interpBreak.ctl.subMode) {
- dvmCheckBefore(pc, fp, self, curMethod);
+ if (self->interpBreak.ctl.subMode) {
+ dvmCheckBefore(pc, fp, self);
}
Handler handler = (Handler) gDvmMterpHandlers[inst & 0xff];
(void) gDvmMterpHandlerNames; /* avoid gcc "defined but not used" */
@@ -56,6 +56,6 @@ void dvmMterpStdRun(Thread* self)
*/
void dvmMterpStdBail(Thread* self)
{
- jmp_buf* pJmpBuf = self->bailPtr;
+ jmp_buf* pJmpBuf = (jmp_buf*) self->interpSave.bailPtr;
longjmp(*pJmpBuf, 1);
}
diff --git a/vm/mterp/cstubs/stubdefs.cpp b/vm/mterp/cstubs/stubdefs.cpp
index 0bffd49f1..1a851b422 100644
--- a/vm/mterp/cstubs/stubdefs.cpp
+++ b/vm/mterp/cstubs/stubdefs.cpp
@@ -82,6 +82,8 @@
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -118,7 +120,7 @@
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-allstubs.cpp b/vm/mterp/out/InterpC-allstubs.cpp
index 49a67bb6e..fac5ef7c3 100644
--- a/vm/mterp/out/InterpC-allstubs.cpp
+++ b/vm/mterp/out/InterpC-allstubs.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
@@ -4344,7 +4346,7 @@ OP_END
* Handler function table, one entry per opcode.
*/
#undef H
-#define H(_op) dvmMterp_##_op
+#define H(_op) (const void*) dvmMterp_##_op
DEFINE_GOTO_TABLE(gDvmMterpHandlers)
#undef H
@@ -4363,12 +4365,12 @@ void dvmMterpStdRun(Thread* self)
{
jmp_buf jmpBuf;
- self->bailPtr = &jmpBuf;
+ self->interpSave.bailPtr = &jmpBuf;
/* We exit via a longjmp */
if (setjmp(jmpBuf)) {
LOGVV("mterp threadid=%d returning", dvmThreadSelf()->threadId);
- return
+ return;
}
/* run until somebody longjmp()s out */
@@ -4382,8 +4384,8 @@ void dvmMterpStdRun(Thread* self)
* FINISH code. For allstubs, we must do an explicit check
* in the interpretation loop.
*/
- if (self-interpBreak.ctl.subMode) {
- dvmCheckBefore(pc, fp, self, curMethod);
+ if (self->interpBreak.ctl.subMode) {
+ dvmCheckBefore(pc, fp, self);
}
Handler handler = (Handler) gDvmMterpHandlers[inst & 0xff];
(void) gDvmMterpHandlerNames; /* avoid gcc "defined but not used" */
@@ -4398,7 +4400,7 @@ void dvmMterpStdRun(Thread* self)
*/
void dvmMterpStdBail(Thread* self)
{
- jmp_buf* pJmpBuf = self->bailPtr;
+ jmp_buf* pJmpBuf = (jmp_buf*) self->interpSave.bailPtr;
longjmp(*pJmpBuf, 1);
}
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.cpp b/vm/mterp/out/InterpC-armv5te-vfp.cpp
index 24fbfdc00..28f72b338 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.cpp
+++ b/vm/mterp/out/InterpC-armv5te-vfp.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-armv5te.cpp b/vm/mterp/out/InterpC-armv5te.cpp
index b750929bd..fd9b000e7 100644
--- a/vm/mterp/out/InterpC-armv5te.cpp
+++ b/vm/mterp/out/InterpC-armv5te.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.cpp b/vm/mterp/out/InterpC-armv7-a-neon.cpp
index 69bf46960..25404d43e 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.cpp
+++ b/vm/mterp/out/InterpC-armv7-a-neon.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-armv7-a.cpp b/vm/mterp/out/InterpC-armv7-a.cpp
index 4ca2a1c13..2cbd5797b 100644
--- a/vm/mterp/out/InterpC-armv7-a.cpp
+++ b/vm/mterp/out/InterpC-armv7-a.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-x86-atom.cpp b/vm/mterp/out/InterpC-x86-atom.cpp
index 5648affa5..1f3c18d4c 100644
--- a/vm/mterp/out/InterpC-x86-atom.cpp
+++ b/vm/mterp/out/InterpC-x86-atom.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.
diff --git a/vm/mterp/out/InterpC-x86.cpp b/vm/mterp/out/InterpC-x86.cpp
index 16237208a..53be42f41 100644
--- a/vm/mterp/out/InterpC-x86.cpp
+++ b/vm/mterp/out/InterpC-x86.cpp
@@ -452,6 +452,8 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#endif
+#define FINISH_BKPT(_opcode) /* FIXME? */
+#define DISPATCH_EXTENDED(_opcode) /* FIXME? */
/*
* The "goto label" statements turn into function calls followed by
@@ -488,7 +490,7 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
* As a special case, "goto bail" turns into a longjmp.
*/
#define GOTO_bail() \
- dvmMterpStdBail(self, false);
+ dvmMterpStdBail(self)
/*
* Periodically check for thread suspension.