diff src/share/vm/graal/graalCodeInstaller.cpp @ 16941:4e3b63e7a9f6

Fixing relock on interpreter when entering synchronized methods.
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Mon, 25 Aug 2014 11:32:04 -0700
parents e7b7a5be4d21
children 6ea6d4c260c8
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Mon Aug 25 10:41:56 2014 -0700
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Mon Aug 25 11:32:04 2014 -0700
@@ -231,6 +231,8 @@
       Location::Type locationType;
       if (type == T_INT) {
         locationType = reference ? Location::narrowoop : Location::int_in_long;
+      } else if(type == T_SHORT || type == T_CHAR || type == T_BYTE || type == T_BOOLEAN) {
+        locationType = Location::int_in_long;
       } else if (type == T_FLOAT) {
         locationType = Location::int_in_long;
       } else if (type == T_LONG) {
@@ -264,7 +266,7 @@
 #ifdef TARGET_ARCH_sparc
       ScopeValue* value = new LocationValue(Location::new_reg_loc(locationType, as_FloatRegister(encoding)->as_VMReg()));
       if (type == T_DOUBLE) {
-        second = new ConstantIntValue(0);
+        second = value;
       }
       return value;
 #else
@@ -278,6 +280,8 @@
       locationType = reference ? Location::oop : Location::lng;
     } else if (type == T_INT) {
       locationType = reference ? Location::narrowoop : Location::normal;
+    } else if(type == T_SHORT || type == T_CHAR || type == T_BYTE || type == T_BOOLEAN) {
+      locationType = Location::normal;
     } else if (type == T_FLOAT) {
       assert(!reference, "unexpected type in stack slot");
       locationType = Location::normal;
@@ -289,6 +293,11 @@
       locationType = Location::oop;
     }
     jint offset = StackSlot::offset(value);
+#ifdef TARGET_ARCH_sparc
+    if(offset >= 0) {
+      offset += 128;
+    }
+#endif
     if (StackSlot::addFrameSize(value)) {
       offset += total_frame_size;
     }