# HG changeset patch # User Stefan Anzinger # Date 1398318116 -7200 # Node ID 2395c0fc5a19653f384f05fbe66bffb85d1e1056 # Parent 21c3c233e81a3866df4c5b410cae25be0c1cf0e4 Added lookup for Gaals JavaThread::graal_alternate_call_target_offset() in the i2c. diff -r 21c3c233e81a -r 2395c0fc5a19 src/cpu/sparc/vm/sharedRuntime_sparc.cpp --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Thu Apr 24 07:25:02 2014 +0200 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Thu Apr 24 07:41:56 2014 +0200 @@ -990,6 +990,19 @@ // Jump to the compiled code just as if compiled code was doing it. __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3); +#ifdef GRAAL + // check if this call should be routed towards a specific entry point + __ ld(Address(G2_thread, in_bytes(JavaThread::graal_alternate_call_target_offset())), G1); + __ cmp(G0, G1); + Label no_alternative_target; + __ br(Assembler::equal, false, Assembler::pn, no_alternative_target); + __ delayed()->nop(); + + __ ld_ptr(G2_thread, in_bytes(JavaThread::graal_alternate_call_target_offset()), G3); + __ st(G0, Address(G2_thread, in_bytes(JavaThread::graal_alternate_call_target_offset()))); + + __ bind(no_alternative_target); +#endif // 6243940 We might end up in handle_wrong_method if // the callee is deoptimized as we race thru here. If that