changeset 16307:2395c0fc5a19

Added lookup for Gaals JavaThread::graal_alternate_call_target_offset() in the i2c.
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Thu, 24 Apr 2014 07:41:56 +0200
parents 21c3c233e81a
children e5a8608f7d63
files src/cpu/sparc/vm/sharedRuntime_sparc.cpp
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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