Re: [rvm-research] Inserting Assembly into Jikes

Claire Murphy <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CAJG7W=_ekfRV7Mtg-j4MVmQbVQfmgntiJiTLJYSXzDnSq_SOkw@mail.gmail.com>
Thank you for your fast response; I will try the syscall route, because I
should be able to do what I want by inserting C.

I have one question about your points though, in case another "magic" ends
up being what I want, (and also just so I understand things):
If Jikes RVM offers no "assembly inserts", what are the "asm.emit"
functions used
in /jikesrvm/rvm/src/org/jikesrvm/compilers/baseline/ppc/BaselineCompilerImpl.java
doing? Am I correct to think that I would make new emit functions in the
Assembler and then modify the compilers as well to populate the "magic"
functions by calling those Assembler functions?

Thank you very much for your time,
Claire


On Thu, Oct 24, 2013 at 8:54 AM, Eliot Moss <[email protected]> wrote:

> 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

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.