From 75425b731c514bf90c985275d80aa7886727d83f Mon Sep 17 00:00:00 2001 From: Chris Dearman Date: Tue, 31 Jan 2012 17:19:49 -0800 Subject: Fix the portable interpreter build Change-Id: Ibf08d50c7a01a4c30559dd2ee9511c28fb1365a5 Signed-off-by: Chris Dearman --- vm/mterp/Mterp.h | 10 ++-------- vm/mterp/cstubs/entry.cpp | 12 ++++++------ vm/mterp/cstubs/stubdefs.cpp | 4 +++- vm/mterp/out/InterpC-allstubs.cpp | 16 +++++++++------- vm/mterp/out/InterpC-armv5te-vfp.cpp | 4 +++- vm/mterp/out/InterpC-armv5te.cpp | 4 +++- vm/mterp/out/InterpC-armv7-a-neon.cpp | 4 +++- vm/mterp/out/InterpC-armv7-a.cpp | 4 +++- vm/mterp/out/InterpC-x86-atom.cpp | 4 +++- vm/mterp/out/InterpC-x86.cpp | 4 +++- 10 files changed, 38 insertions(+), 28 deletions(-) (limited to 'vm/mterp') 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. -- cgit v1.2.3