From 6e2af6d21076023f141a482d49b607407b2bc2c1 Mon Sep 17 00:00:00 2001
From: Andy McFadden dalvik/vm/Android.mk
will find the files for
your architecture. If $(TARGET_ARCH)
is configured this
will happen automatically.
+dalvik/vm/Dvm.mk
to always be false
.
You now have the basic framework in place. Whenever you make a change, you
@@ -177,7 +180,7 @@ of the files in dalvik/vm/mterp/out
by executing
in assembly.
dalvik
directory, regenerate the
libdvm.so
library with mm
. You can also use
-make libdvm
from the top of the tree.
+mmm dalvik/vm
from the top of the tree.
This will leave you with an updated libdvm.so, which can be pushed out to @@ -241,7 +244,7 @@ for examples.
-There are roughly 230 Dalvik opcodes, including some that are inserted by +There are roughly 250 Dalvik opcodes, including some that are inserted by dexopt and aren't described in the Dalvik bytecode documentation. Each one must perform the appropriate actions, fetch the next opcode, and diff --git a/vm/mterp/cstubs/entry.c b/vm/mterp/cstubs/entry.c index af31a3da7..4fe0d2cad 100644 --- a/vm/mterp/cstubs/entry.c +++ b/vm/mterp/cstubs/entry.c @@ -30,9 +30,8 @@ bool dvmMterpStdRun(MterpGlue* glue) */ changeInterp = setjmp(jmpBuf) -1; if (changeInterp >= 0) { - Thread* threadSelf = dvmThreadSelf(); LOGVV("mterp threadid=%d returning %d\n", - threadSelf->threadId, changeInterp); + dvmThreadSelf()->threadId, changeInterp); return changeInterp; } @@ -64,6 +63,7 @@ bool dvmMterpStdRun(MterpGlue* glue) u2 inst = /*glue->*/pc[0]; Handler handler = (Handler) gDvmMterpHandlers[inst & 0xff]; + (void) gDvmMterpHandlerNames; /* avoid gcc "defined but not used" */ LOGVV("handler %p %s\n", handler, (const char*) gDvmMterpHandlerNames[inst & 0xff]); (*handler)(glue); diff --git a/vm/mterp/out/InterpAsm-x86-atom.S b/vm/mterp/out/InterpAsm-x86-atom.S index 136e2f293..d4dd70504 100644 --- a/vm/mterp/out/InterpAsm-x86-atom.S +++ b/vm/mterp/out/InterpAsm-x86-atom.S @@ -477,6 +477,7 @@ .LintMax: .long 0x7FFFFFFF + .global dvmAsmInstructionStart .type dvmAsmInstructionStart, %function dvmAsmInstructionStart = .L_OP_NOP diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c index 5d8e3d66e..fb72f261a 100644 --- a/vm/mterp/out/InterpC-allstubs.c +++ b/vm/mterp/out/InterpC-allstubs.c @@ -3079,9 +3079,8 @@ bool dvmMterpStdRun(MterpGlue* glue) */ changeInterp = setjmp(jmpBuf) -1; if (changeInterp >= 0) { - Thread* threadSelf = dvmThreadSelf(); LOGVV("mterp threadid=%d returning %d\n", - threadSelf->threadId, changeInterp); + dvmThreadSelf()->threadId, changeInterp); return changeInterp; } @@ -3113,12 +3112,14 @@ bool dvmMterpStdRun(MterpGlue* glue) u2 inst = /*glue->*/pc[0]; Handler handler = (Handler) gDvmMterpHandlers[inst & 0xff]; + (void) gDvmMterpHandlerNames; /* avoid gcc "defined but not used" */ LOGVV("handler %p %s\n", handler, (const char*) gDvmMterpHandlerNames[inst & 0xff]); (*handler)(glue); } } + /* * C mterp exit point. Call here to bail out of the interpreter. */ -- 2.11.0