changeset 10002:3bc930dd9313

Merge.
author Doug Simon <doug.simon@oracle.com>
date Tue, 11 Jun 2013 22:02:49 +0200
parents 38d7b55f87b0 (current diff) e85afceb39e7 (diff)
children e23b0486e750
files
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Tue Jun 11 22:02:23 2013 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Tue Jun 11 22:02:49 2013 +0200
@@ -33,6 +33,7 @@
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.asm.*;
 import com.oracle.graal.asm.amd64.*;
+import com.oracle.graal.asm.amd64.AMD64Assembler.ConditionFlag;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.StandardOp.MoveOp;
@@ -667,6 +668,8 @@
         } else {
             // Otherwise the narrow heap base, which resides always in register 12, is subtracted
             // followed by right shift.
+            masm.testq(scratchRegister, scratchRegister);
+            masm.cmovq(ConditionFlag.Equal, scratchRegister, AMD64.r12);
             masm.subq(scratchRegister, AMD64.r12);
             masm.shrq(scratchRegister, logMinObjAlignment);
         }
@@ -681,9 +684,12 @@
                 masm.shlq(resRegister, logMinObjAlignment);
             }
         } else {
-            // Otherwise the narrow heap base is added to the shifted address.
+            Label done = new Label();
             masm.shlq(resRegister, logMinObjAlignment);
+            masm.jccb(ConditionFlag.Equal, done);
+            // Otherwise the narrow heap base is added to the shifted address.
             masm.addq(resRegister, AMD64.r12);
+            masm.bind(done);
         }
     }
 
--- a/src/share/vm/runtime/arguments.cpp	Tue Jun 11 22:02:23 2013 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Tue Jun 11 22:02:49 2013 +0200
@@ -2102,9 +2102,8 @@
       warning("UseCompressedOops is disabled, because it is not supported by Graal");
       FLAG_SET_CMDLINE(bool, UseCompressedOops, false);
     } else {
-      jio_fprintf(defaultStream::error_stream(),
-                    "CompressedOops are not supported in Graal at the moment\n");
-      status = false;
+      status = true;
+      FLAG_SET_CMDLINE(bool, UseCompressedOops, true);
     }
   } else {
     // This prevents the flag being set to true by set_ergonomics_flags()