Claire Murphy <email@example.com> wrote on 10/23/2013 09:35:25 PM:
> My name is Claire, and I'm part of a team of students from Harvey
> Mudd College.
> We are working with Jikes RVM and need to insert a new assembly
> instruction directly into the host machine--similar to calling asm
> goto("(instruction)") in C. I've looked at the Jikes source code and
> I suspect the magic functions and the emit(instruction) functions in
> the Assembler file are what I'm looking for, but I'm unclear on how
> they work and whether they do what I want. Can you help?
> We literally want a faster equivalent of using JNI to insert C,
> which inserts assembly.
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.