changeset 8993:02630437264e

Merge.
author Doug Simon <doug.simon@oracle.com>
date Wed, 10 Apr 2013 17:09:52 +0200
parents 7afb9d95298e (current diff) 02f57662b6c4 (diff)
children 68d07bea21b8
files
diffstat 5 files changed, 21 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRuntime.java	Wed Apr 10 17:09:36 2013 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRuntime.java	Wed Apr 10 17:09:52 2013 +0200
@@ -44,6 +44,7 @@
 import static com.oracle.graal.hotspot.replacements.CipherBlockChainingSubstitutions.DecryptAESCryptStubCall.*;
 import static com.oracle.graal.hotspot.replacements.CipherBlockChainingSubstitutions.EncryptAESCryptStubCall.*;
 
+import com.oracle.graal.amd64.*;
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
@@ -71,13 +72,13 @@
                 /*             ret */ ret(Kind.Void));
 
         addRuntimeCall(ARITHMETIC_FREM, config.arithmeticFremStub,
-                /*           temps */ null,
+                /*           temps */ new Register[]{AMD64.rax},
                 /*             ret */ ret(Kind.Float),
                 /* arg0:         a */ javaCallingConvention(Kind.Float,
                 /* arg1:         b */                       Kind.Float));
 
         addRuntimeCall(ARITHMETIC_DREM, config.arithmeticDremStub,
-                /*           temps */ null,
+                /*           temps */ new Register[]{AMD64.rax},
                 /*             ret */ ret(Kind.Double),
                 /* arg0:         a */ javaCallingConvention(Kind.Double,
                 /* arg1:         b */                       Kind.Double));
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java	Wed Apr 10 17:09:36 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java	Wed Apr 10 17:09:52 2013 +0200
@@ -62,15 +62,15 @@
     }
 
     @Snippet
-    public static void serialArrayRangeWriteBarrier(@Parameter("dstObject") Object destObject, @Parameter("destPos") int destPos, @Parameter("length") int length) {
-        Object dest = FixedValueAnchorNode.getObject(destObject);
+    public static void serialArrayRangeWriteBarrier(@Parameter("dstObject") Object destinationObject, @Parameter("destPos") int destinationStartingIndex, @Parameter("length") int length) {
+        Object dest = FixedValueAnchorNode.getObject(destinationObject);
         int cardShift = cardTableShift();
         long cardStart = cardTableStart();
         final int scale = arrayIndexScale(Kind.Object);
         int header = arrayBaseOffset(Kind.Object);
         long dstAddr = GetObjectAddressNode.get(dest);
-        long start = (dstAddr + header + (long) destPos * scale) >>> cardShift;
-        long end = (dstAddr + header + ((long) destPos + length - 1) * scale) >>> cardShift;
+        long start = (dstAddr + header + (long) destinationStartingIndex * scale) >>> cardShift;
+        long end = (dstAddr + header + ((long) destinationStartingIndex + length - 1) * scale) >>> cardShift;
         long count = end - start + 1;
         while (count-- > 0) {
             DirectStoreNode.store((start + cardStart) + count, false, Kind.Boolean);
@@ -103,8 +103,8 @@
             ResolvedJavaMethod method = serialArrayRangeWriteBarrier;
             Key key = new Key(method);
             Arguments arguments = new Arguments();
-            arguments.add("dstObject", arrayRangeWriteBarrier.getDstObject());
-            arguments.add("destPos", arrayRangeWriteBarrier.getDstPos());
+            arguments.add("dstObject", arrayRangeWriteBarrier.getDestinationObject());
+            arguments.add("destPos", arrayRangeWriteBarrier.getDestinationStartingIndex());
             arguments.add("length", arrayRangeWriteBarrier.getLength());
             SnippetTemplate template = cache.get(key);
             template.instantiate(runtime, arrayRangeWriteBarrier, DEFAULT_REPLACER, arguments);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/SerialArrayRangeWriteBarrier.java	Wed Apr 10 17:09:36 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/SerialArrayRangeWriteBarrier.java	Wed Apr 10 17:09:52 2013 +0200
@@ -27,26 +27,26 @@
 
 public final class SerialArrayRangeWriteBarrier extends FixedWithNextNode implements Lowerable {
 
-    @Input private ValueNode dstObject;
-    @Input private ValueNode dstPos;
+    @Input private ValueNode destinationObject;
+    @Input private ValueNode destinationStartingIndex;
     @Input private ValueNode length;
 
-    public ValueNode getDstObject() {
-        return dstObject;
+    public ValueNode getDestinationObject() {
+        return destinationObject;
     }
 
-    public ValueNode getDstPos() {
-        return dstPos;
+    public ValueNode getDestinationStartingIndex() {
+        return destinationStartingIndex;
     }
 
     public ValueNode getLength() {
         return length;
     }
 
-    public SerialArrayRangeWriteBarrier(ValueNode dstObject, ValueNode dstPos, ValueNode length) {
+    public SerialArrayRangeWriteBarrier(ValueNode destinationObject, ValueNode destinationStartingIndex, ValueNode length) {
         super(StampFactory.forVoid());
-        this.dstObject = dstObject;
-        this.dstPos = dstPos;
+        this.destinationObject = destinationObject;
+        this.destinationStartingIndex = destinationStartingIndex;
         this.length = length;
 
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/SerialWriteBarrier.java	Wed Apr 10 17:09:36 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/SerialWriteBarrier.java	Wed Apr 10 17:09:52 2013 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java	Wed Apr 10 17:09:36 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java	Wed Apr 10 17:09:52 2013 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,6 @@
     /*
      * Various metrics on the circumstances in which tail duplication was/wasn't performed.
      */
-    private static final DebugMetric metricDuplicationMonitors = Debug.metric("DuplicationMonitors");
     private static final DebugMetric metricDuplicationEnd = Debug.metric("DuplicationEnd");
     private static final DebugMetric metricDuplicationEndPerformed = Debug.metric("DuplicationEndPerformed");
     private static final DebugMetric metricDuplicationOther = Debug.metric("DuplicationOther");
@@ -168,20 +167,11 @@
         assert replacements == null || replacements.size() == merge.forwardEndCount();
         FixedNode fixed = merge;
         int fixedCount = 0;
-        boolean containsMonitor = false;
         while (fixed instanceof FixedWithNextNode) {
-            if (fixed instanceof MonitorEnterNode || fixed instanceof MonitorExitNode) {
-                containsMonitor = true;
-            }
             fixed = ((FixedWithNextNode) fixed).next();
             fixedCount++;
         }
-        if (containsMonitor) {
-            // cannot currently be handled
-            // TODO (ls) re-evaluate this limitation after changes to the lock representation and
-            // the LIR generator
-            metricDuplicationMonitors.increment();
-        } else if (fixedCount > 1) {
+        if (fixedCount > 1) {
             if (fixed instanceof EndNode && !(((EndNode) fixed).merge() instanceof LoopBeginNode)) {
                 metricDuplicationEnd.increment();
                 if (decision.doTransform(merge, fixedCount)) {