Re: [rvm-research] Inserting Assembly into Jikes
Erik Brangs <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 24.10.2013 21:49, Claire Murphy wrote: > (and also just so I understand things): You have three options to directly use machine instructions in Jikes RVM: a) SysCalls. Appropriate when you want to (re)use C code. b) Magic. Used for short instruction sequences that cannot be implemented in Java code. c) OutOfLineMachineCode. Used for longer instruction sequences that cannot be implemented in Java code. These are all intended for use in Jikes RVM code. If you wanted to modify normal Java code compiled by the Jikes RVM by inserting assembly, another approach might be more suitable. > 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? Yes. As already mentioned, further modifications to the compilers might be necessary depending on what you want to do. Additional hints from me: a) The assemblers for IA32 are generated from a template during the build process. b) The implementation for magic methods is different for IA32 and PPC for the baseline compilers. If you're going to ignore PPC completely, it's easier to just look at the IA32 code. c) There are some magics that do not do anything on PPC (e.g. pause) or IA32 (e.g. isync). Kind regards, Erik Brangs ------------------------------------------------------------------------------ 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