Re: [rvm-research] Inserting Assembly into Jikes
Eliot Moss <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/24/2013 7:46 AM, David P Grove wrote: > Claire Murphy <[email protected]> wrote on 10/23/2013 09:35:25 PM: > If a fast path from Java to C is what you are looking for, then the quickest way to get it working > is using VM.sysCall. (Injects a call to a C function that you write in the bootimage). > > See org.jikesrvm.runtime.SysCall.java and follow the pattern that is there for the other sysCalls. Dave will know more about this, but here are some things I can tell you: 1) Jikes RVM offers no "assembly inserts". 2) It might be possible to extend the set of "magics" to do what you want. Note that a magic should (in principle) produce some kind of working, or at least not totally broken, code *for each platform*. (Jikes RVM is not just for x86.) I suppose in a research project you could cut that corner. 3) Adding a magic involves changing TWO compilers, BaseLine and Opt. BaseLine is fairly straightforward (once you modify the assembler (see below)); Opt perhaps less so, but Dave would know that better. I've not dealt with adding magics to Opt. 4) You need to extend the assembler(s), disassembler(s), etc. You also need to understand the properties of the instructions -- do they affect non-interruptibility of code sequences? Do they involve pointers or pointer accesses, in which case you might need to understand interaction with GC? Etc. A managed language environment is rather more complex that C/C++ in these respects! Regards -- Eliot Moss ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk