Lines Matching full:code
33 The native code in the core libraries (chiefly <code>dalvik/libcore</code>,
34 but also <code>dalvik/vm/native</code>) is written in C/C++ and is expected
35 to work without modification in a Linux environment. Much of the code
38 The core libraries pull in code from many other projects, including
61 The code lives in <code>dalvik/vm/arch/*</code>, with the FFI-based version
65 <code>void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo,
67 JValue* pReturn)</code>
71 <code>return_type func(JNIEnv* pEnv, Object* this [, <i>args</i>])<br></code>
73 <code>return_type func(JNIEnv* pEnv, ClassObject* clazz [, <i>args</i>])</code>
75 The role of <code>dvmPlatformInvoke</code> is to convert the values in
76 <code>argv</code> into C-style calling conventions, call the method, and
77 then place the return type into <code>pReturn</code> (a union that holds
78 all of the basic JNI types). The code may use the method signature
106 be controlled with the <code>dalvik.vm.execution-mode</code> system
109 <code>adb shell "echo dalvik.vm.execution-mode = int:portable >> /data/local.prop"</code>
139 or simply continue on to additional code outside the basic space. Some of
151 <code>dalvik/vm/mterp/out</code> directory.
153 The interpreter sources live in <code>dalvik/vm/mterp</code>. If you
154 haven't yet, you should read <code>dalvik/vm/mterp/README.txt</code> now.
164 let's call it <code>myarch</code>.
165 <li>Make a copy of <code>dalvik/vm/mterp/config-allstubs</code> to
166 <code>dalvik/vm/mterp/config-myarch</code>.
167 <li>Create a <code>dalvik/vm/mterp/myarch</code> directory to hold your
169 <li>Add <code>myarch</code> to the list in
170 <code>dalvik/vm/mterp/rebuild.sh</code>.
171 <li>Make sure <code>dalvik/vm/Android.mk</code> will find the files for
172 your architecture. If <code>$(TARGET_ARCH)</code> is configured this
181 <li>In the <code>dalvik/vm/mterp</code> directory, regenerate the contents
182 of the files in <code>dalvik/vm/mterp/out</code> by executing
183 <code>./rebuild.sh</code>. Note there are two files, one in C and one
185 <li>In the <code>dalvik</code> directory, regenerate the
186 <code>libdvm.so</code> library with <code>mm</code>. You can also use
187 <code>make libdvm</code> from the top of the tree.
191 a device with <code>adb sync</code> or <code>adb push</code>. If you're
192 using the emulator, you need to add <code>make snod</code> (System image,
197 works by examining <code>dalvik/vm/mterp/cstubs/entry.c</code>. The
198 code runs in a loop, pulling out the next opcode, and invoking the
215 <code>dalvik/vm/mterp/myarch/stub.S</code> that contains one line:
219 Then, in <code>dalvik/vm/mterp/config-myarch</code>, add this below the
220 <code>handler-size</code> directive:
226 Regenerate the sources with <code>./rebuild.sh</code>, and take a look
227 inside <code>dalvik/vm/mterp/out/InterpAsm-myarch.S</code>. You should
229 <code>dvmAsmInstructionStart</code> label. The <code>stub.S</code>
230 code will be used anywhere you don't provide an assembly implementation.
232 Note that each block begins with a <code>.balign 64</code> directive.
234 <code>${opcode}</code> text changed into an opcode name, which should
235 be used to call the C implementation (<code>dvmMterp_${opcode}</code>).
237 The actual contents of <code>stub.S</code> are up to you to define.
238 See <code>entry.S</code> and <code>stub.S</code> in the <code>armv5te</code>
239 or <code>x86</code> directories for working examples.
242 able to use most of the existing code and just provide replacements for
243 a few instructions. Look at the <code>armv4t</code> implementation as
257 <code>dalvik/vm/mterp/c/OP_*</code>).
267 of <code>OP_NOP</code>. For demonstration purposes, fake it for now by
268 putting this into <code>dalvik/vm/mterp/myarch/OP_NOP.S</code>:
273 Then, in the <code>op-start</code> section of <code>config-myarch</code>, add:
279 <code>myarch</code> directory instead of the C version from the <code>c</code>
282 Execute <code>./rebuild.sh</code>. Look at <code>InterpAsm-myarch.S</code>
283 and <code>InterpC-myarch.c</code> in the <code>out</code> directory. You
284 will see that the <code>OP_NOP</code> stub wrapper has been replaced with our
285 new code in the assembly file, and the C stub implementation is no longer
314 See the <code>entry.S</code> file in <code>x86</code> or <code>armv5te</code>
322 A number of VM tests can be found in <code>dalvik/tests</code>. The most
323 useful during interpreter development is <code>003-omnibus-opcodes</code>,
333 the test against your desktop VM by specifying <code>--reference</code>
335 <code>--portable</code> and <code>--fast</code> to explictly specify
338 Some instructions are replaced by <code>dexopt</code>, notably when
341 <code>--no-optimize</code> option.
346 call. For an example, look at <code>common_squeak</code> in
347 <code>dalvik/vm/mterp/armv5te/footer.S</code>.