segfault after call_VM
Xin Tong
xerox.time.tech at gmail.com
Wed Apr 3 10:43:49 PDT 2013
I am using call_VM to implement a callout to a C function I implemented
from the dynamically generated interpreter code. but the program segfaults
after return from call_VM. Does not call_VM set up code that save and
restores registers so that the generated interpreter code can continue
correctly ? If not, what assembler functions can i use to implement the
callout to C functions.
// Jump to from_interpreted entry of a call unless single stepping is
possible
// in this thread in which case we must call the i2i entry
void InterpreterMacroAssembler::jump_from_interpreted(Register method,
Register temp) {
prepare_to_jump_from_interpreted();
....
// XIN TONG. THIS IS JUST BEFORE A METHOD IS CALLED.
// generate a call to static routine.
call_VM(noreg, CAST_FROM_FN_PTR(address,
InterpreterRuntime::test_static_rountine));
jmp(Address(method, methodOopDesc::from_interpreted_offset()));
}
Thank you,
Xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130403/9ef9c223/attachment.html
More information about the hotspot-runtime-dev
mailing list