src/cpu/x86/vm/x86_64.ad

Print this page
rev 3825 : Specify offset of IC load in java_to_interp stub.

If a compiled static call calls the interpreter, it jumps past a
java_to_interp stub in the compiled code. Patching this call must
find the load of the IC. So far the shared code assumed this is the
first instruction in the stub.
This might not be the case if, for example, the base of the constant
table must be loaded.
Extend CompiledStaticCall to consider an offset from its beginning
where to search the load of the IC.

@@ -1363,10 +1363,14 @@
   return (offset < 0x80) ? 5 : 8; // REX
 }
 
 //=============================================================================
 
+// Offset from start of compiled java to interpreter stub to the load
+// constant that loads the inline cache (IC) (0 on amd64).
+const int CompiledStaticCall::comp_to_int_load_offset = 0;
+
 // emit call stub, compiled java to interpreter
 void emit_java_to_interp(CodeBuffer& cbuf)
 {
   // Stub is fixed up when the corresponding call is converted from
   // calling compiled code to calling interpreted code.