changeset 22862:9d9c7d4ed220

Disable method handle return stack fixup logic in JDK9
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 21 Oct 2015 14:11:00 -0700
parents bc1d4ecfae54
children f6e1108b9a94
files graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java	Wed Oct 21 14:10:54 2015 -0700
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java	Wed Oct 21 14:11:00 2015 -0700
@@ -67,10 +67,12 @@
         // Discard the return address, thus completing restoration of caller frame
         masm.incrementq(rsp, 8);
 
-        // Restore rsp from rbp if the exception PC is a method handle call site.
-        AMD64Address dst = new AMD64Address(thread, isMethodHandleReturnOffset);
-        masm.cmpl(dst, 0);
-        masm.cmovq(ConditionFlag.NotEqual, rsp, rbp);
+        if (System.getProperty("java.specification.version").compareTo("1.9") < 0) {
+            // Restore rsp from rbp if the exception PC is a method handle call site.
+            AMD64Address dst = new AMD64Address(thread, isMethodHandleReturnOffset);
+            masm.cmpl(dst, 0);
+            masm.cmovq(ConditionFlag.NotEqual, rsp, rbp);
+        }
 
         masm.jmp(asRegister(handlerInCallerPc));
     }