diff graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java @ 6676:090868cbcda6

Graal infrastructure for OnStackReplacement
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 07 Nov 2012 14:14:35 +0100
parents 6eb83c6eb177
children 41938af2b3d8
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java	Wed Nov 07 14:08:03 2012 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java	Wed Nov 07 14:14:35 2012 +0100
@@ -73,6 +73,15 @@
         }
 
         @Override
+        protected CallingConvention createCallingConvention() {
+            if (graph.getEntryBCI() == StructuredGraph.INVOCATION_ENTRY_BCI) {
+                return super.createCallingConvention();
+            } else {
+                return frameMap.registerConfig.getCallingConvention(JavaCallee, method.getSignature().getReturnKind(), new Kind[]{Kind.Long}, target, false);
+            }
+        }
+
+        @Override
         public void visitSafepointNode(SafepointNode i) {
             LIRFrameState info = state();
             append(new AMD64SafepointOp(info, runtime().config));
@@ -245,7 +254,6 @@
         Label unverifiedStub = new Label();
 
         // Emit the prefix
-        tasm.recordMark(Marks.MARK_OSR_ENTRY);
 
         boolean isStatic = Modifier.isStatic(method.getModifiers());
         if (!isStatic) {
@@ -260,6 +268,7 @@
         }
 
         asm.align(config.codeEntryAlignment);
+        tasm.recordMark(Marks.MARK_OSR_ENTRY);
         tasm.recordMark(Marks.MARK_VERIFIED_ENTRY);
 
         // Emit code for the LIR