changeset 22649:467f38f99aea

Use correct wordKind in CurrentJavaThreadNode and FrameMap.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 17 Sep 2015 11:08:55 +0200
parents 63643c4ef733
children 61026507bfa6
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentJavaThreadNode.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentJavaThreadNode.java	Thu Sep 17 14:10:51 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentJavaThreadNode.java	Thu Sep 17 11:08:55 2015 +0200
@@ -25,6 +25,7 @@
 import jdk.internal.jvmci.code.Register;
 import jdk.internal.jvmci.meta.JavaKind;
 import jdk.internal.jvmci.meta.LIRKind;
+import jdk.internal.jvmci.meta.PlatformKind;
 
 import com.oracle.graal.compiler.common.type.StampFactory;
 import com.oracle.graal.graph.NodeClass;
@@ -43,21 +44,19 @@
 public final class CurrentJavaThreadNode extends FloatingNode implements LIRLowerable {
     public static final NodeClass<CurrentJavaThreadNode> TYPE = NodeClass.create(CurrentJavaThreadNode.class);
 
-    protected LIRKind wordKind;
-
     public CurrentJavaThreadNode(@InjectedNodeParameter WordTypes wordTypes) {
         this(wordTypes.getWordKind());
     }
 
     public CurrentJavaThreadNode(JavaKind wordKind) {
         super(TYPE, StampFactory.forKind(wordKind));
-        this.wordKind = LIRKind.value(wordKind);
     }
 
     @Override
     public void generate(NodeLIRBuilderTool gen) {
         Register rawThread = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).getProviders().getRegisters().getThreadRegister();
-        gen.setResult(this, rawThread.asValue(wordKind));
+        PlatformKind wordKind = gen.getLIRGeneratorTool().target().arch.getWordKind();
+        gen.setResult(this, rawThread.asValue(LIRKind.value(wordKind)));
     }
 
     @NodeIntrinsic
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Thu Sep 17 14:10:51 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Thu Sep 17 11:08:55 2015 +0200
@@ -33,7 +33,6 @@
 import jdk.internal.jvmci.code.RegisterConfig;
 import jdk.internal.jvmci.code.StackSlot;
 import jdk.internal.jvmci.code.TargetDescription;
-import jdk.internal.jvmci.meta.JavaKind;
 import jdk.internal.jvmci.meta.LIRKind;
 import jdk.internal.jvmci.meta.Value;
 
@@ -301,7 +300,7 @@
             for (int slotIndex = 0; slotIndex < slots; slotIndex++) {
                 StackSlot objectSlot = null;
                 if (objects.get(slotIndex)) {
-                    objectSlot = allocateNewSpillSlot(LIRKind.reference(JavaKind.Object), slotIndex * getTarget().wordSize);
+                    objectSlot = allocateNewSpillSlot(LIRKind.reference(getTarget().arch.getWordKind()), slotIndex * getTarget().wordSize);
                     addObjectStackSlot(objectSlot);
                 }
                 if (slotIndex == 0) {