changeset 18669:7cc21427d54b

Merge
author Stefan Anzinger <stefan.a.anzinger@oracle.com>
date Fri, 12 Dec 2014 20:29:35 +0100
parents 6ace9e5bc384 (diff) b026b6d86ab6 (current diff)
children 8aeee4179e22
files graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Context.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Handler.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Invocation.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/LinkedIdentityHashMap.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/ProxyUtil.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/DeoptimizationStub.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCBreakpointOp.java graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java
diffstat 9 files changed, 39 insertions(+), 188 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java	Fri Dec 12 20:29:35 2014 +0100
@@ -1039,6 +1039,18 @@
             this(rd.encoding(), op3.getValue(), rs1.encoding(), 1, getXBit(op3), 0, 0, simm13);
         }
 
+        /**
+         * Used for trap on Integer Condition Codes (Tcc)
+         *
+         * @param op3
+         * @param rs1
+         * @param simm13
+         * @param cf
+         */
+        public Fmt10(Op3s op3, Register rs1, int simm13, ConditionFlag cf) {
+            this(cf.getValue(), op3.getValue(), rs1.encoding(), 1, getXBit(op3), 0, 0, simm13);
+        }
+
         public Fmt10(Op3s op3) {
             this(0, op3.getValue(), 0, 0, getXBit(op3), 0, 0, 0);
         }
@@ -1261,17 +1273,6 @@
         }
     }
 
-    public static class Fmt4a {
-
-        public Fmt4a(SPARCAssembler masm, int op, int op3, int cc, int rs1, int regOrImmediate, int rd) {
-            assert op == 2;
-            assert rs1 >= 0 && rs1 < 0x20;
-            assert rd >= 0 && rd < 0x10;
-
-            masm.emitInt(op << 30 | rd << 25 | op3 << 19 | rs1 << 14 | ((cc << 11) & 0x000001800) | regOrImmediate);
-        }
-    }
-
     // @formatter:off
     /**
      * Instruction format for Movcc.
@@ -4396,14 +4397,17 @@
         }
     }
 
-    public static class Ta extends Fmt4a {
-
-        public Ta(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Always.getValue());
-        }
-
-        public Ta(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Always.getValue());
+    public static class Ta extends Fmt10 {
+
+        public Ta(int trap) {
+            super(Op3s.Trap, g0, trap, ConditionFlag.Always);
+        }
+    }
+
+    public static class Tcc extends Fmt10 {
+
+        public Tcc(ConditionFlag flag, int trap) {
+            super(Op3s.Trap, g0, trap, flag);
         }
     }
 
@@ -4418,127 +4422,6 @@
         }
     }
 
-    public static class Tcc extends Fmt4a {
-
-        public Tcc(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.CarryClear.getValue());
-        }
-
-        public Tcc(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.CarryClear.getValue());
-        }
-    }
-
-    public static class Tcs extends Fmt4a {
-
-        public Tcs(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.CarrySet.getValue());
-        }
-
-        public Tcs(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.CarrySet.getValue());
-        }
-    }
-
-    public static class Te extends Fmt4a {
-
-        public Te(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Equal.getValue());
-        }
-
-        public Te(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Equal.getValue());
-        }
-    }
-
-    public static class Tg extends Fmt4a {
-
-        public Tg(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Greater.getValue());
-        }
-
-        public Tg(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Greater.getValue());
-        }
-    }
-
-    public static class Tge extends Fmt4a {
-
-        public Tge(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.GreaterEqual.getValue());
-        }
-
-        public Tge(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.GreaterEqual.getValue());
-        }
-    }
-
-    public static class Tle extends Fmt4a {
-
-        public Tle(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.LessEqual.getValue());
-        }
-
-        public Tle(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.LessEqual.getValue());
-        }
-    }
-
-    public static class Tleu extends Fmt4a {
-
-        public Tleu(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.LessEqualUnsigned.getValue());
-        }
-
-        public Tleu(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.LessEqualUnsigned.getValue());
-        }
-    }
-
-    public static class Tn extends Fmt4a {
-
-        public Tn(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Never.getValue());
-        }
-
-        public Tn(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Never.getValue());
-        }
-    }
-
-    public static class Tne extends Fmt4a {
-
-        public Tne(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.NotEqual.getValue());
-        }
-
-        public Tne(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.NotEqual.getValue());
-        }
-    }
-
-    public static class Tneg extends Fmt4a {
-
-        public Tneg(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Negative.getValue());
-        }
-
-        public Tneg(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Negative.getValue());
-        }
-    }
-
-    public static class Tpos extends Fmt4a {
-
-        public Tpos(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.Positive.getValue());
-        }
-
-        public Tpos(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.Positive.getValue());
-        }
-    }
-
     public static class Tsubcc extends Fmt10 {
 
         public Tsubcc(Register src1, int simm13, Register dst) {
@@ -4550,28 +4433,6 @@
         }
     }
 
-    public static class Tvc extends Fmt4a {
-
-        public Tvc(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.OverflowClear.getValue());
-        }
-
-        public Tvc(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.OverflowClear.getValue());
-        }
-    }
-
-    public static class Tvs extends Fmt4a {
-
-        public Tvs(SPARCAssembler asm, CC cc, Register src1, int trap) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), trap, ConditionFlag.OverflowSet.getValue());
-        }
-
-        public Tvs(SPARCAssembler asm, CC cc, Register src1, Register src2) {
-            super(asm, Ops.ArithOp.getValue(), Op3s.Trap.getValue(), cc.getValue(), src1.encoding(), src2.encoding(), ConditionFlag.OverflowSet.getValue());
-        }
-    }
-
     public static class Udivx extends Fmt10 {
 
         public Udivx(Register src1, int simm13, Register dst) {
--- a/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCMacroAssembler.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCMacroAssembler.java	Fri Dec 12 20:29:35 2014 +0100
@@ -22,7 +22,6 @@
  */
 package com.oracle.graal.asm.sparc;
 
-import static com.oracle.graal.asm.sparc.SPARCAssembler.CC.*;
 import static com.oracle.graal.sparc.SPARC.*;
 
 import com.oracle.graal.api.code.*;
@@ -520,13 +519,4 @@
             super(dst, g0, dst);
         }
     }
-
-    @SuppressWarnings("unused")
-    public static class Trap {
-
-        public Trap(SPARCAssembler asm, int trap) {
-            assert trap >= 0 && trap <= 0x7f;
-            new Ta(asm, Icc, g0, trap);
-        }
-    }
 }
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java	Fri Dec 12 20:29:35 2014 +0100
@@ -69,6 +69,7 @@
         new Cmp(o7, o7).emit(masm);
         new Movcc(ConditionFlag.NotZero, CC.Icc, l7, sp).emit(masm);
 
+        new Mov(i7, o7).emit(masm);
         new Jmpl(asRegister(handlerInCallerPc), 0, g0).emit(masm);
         new Nop().emit(masm);
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/DeoptimizationStub.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/DeoptimizationStub.java	Fri Dec 12 20:29:35 2014 +0100
@@ -135,7 +135,7 @@
          * Stack bang to make sure there's enough room for the interpreter frames. Bang stack for
          * total size of the interpreter frames plus shadow page size. Bang one page at a time
          * because large sizes can bang beyond yellow and red zones.
-         *
+         * 
          * @deprecated This code should go away as soon as JDK-8032410 hits the Graal repository.
          */
         final int totalFrameSizes = unrollBlock.readInt(deoptimizationUnrollBlockTotalFrameSizesOffset());
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java	Fri Dec 12 20:29:35 2014 +0100
@@ -147,7 +147,7 @@
          * Stack bang to make sure there's enough room for the interpreter frames. Bang stack for
          * total size of the interpreter frames plus shadow page size. Bang one page at a time
          * because large sizes can bang beyond yellow and red zones.
-         *
+         * 
          * @deprecated This code should go away as soon as JDK-8032410 hits the Graal repository.
          */
         final int totalFrameSizes = unrollBlock.readInt(deoptimizationUnrollBlockTotalFrameSizesOffset());
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCBreakpointOp.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCBreakpointOp.java	Fri Dec 12 20:29:35 2014 +0100
@@ -25,8 +25,8 @@
 import static com.oracle.graal.lir.LIRInstruction.OperandFlag.*;
 
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.asm.sparc.SPARCAssembler.Ta;
 import com.oracle.graal.asm.sparc.*;
-import com.oracle.graal.asm.sparc.SPARCMacroAssembler.Trap;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
 
@@ -51,8 +51,7 @@
     }
 
     @Override
-    @SuppressWarnings("unused")
     public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
-        new Trap(masm, ST_RESERVED_FOR_USER_0);
+        new Ta(ST_RESERVED_FOR_USER_0).emit(masm);
     }
 }
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java	Fri Dec 12 20:29:35 2014 +0100
@@ -332,7 +332,7 @@
                  * VirtualState nodes contained in the old exit's state may be shared by other
                  * dominated VirtualStates. Those dominated virtual states need to see the
                  * proxy->phi update that are applied below.
-                 *
+                 * 
                  * We now update the original fragment's nodes accordingly:
                  */
                 originalExitState.applyToVirtual(node -> original.nodes.clearAndGrow(node));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Fri Dec 12 20:29:35 2014 +0100
@@ -84,7 +84,7 @@
                 /*
                  * One of the two objects has identity, the other doesn't. In code, this looks like
                  * "Integer.valueOf(a) == new Integer(b)", which is always false.
-                 *
+                 * 
                  * In other words: an object created via valueOf can never be equal to one created
                  * by new in the same compilation unit.
                  */
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java	Fri Nov 28 16:07:51 2014 +0100
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java	Fri Dec 12 20:29:35 2014 +0100
@@ -39,23 +39,23 @@
  *
  * <pre>
  *     HexCodeFile ::= Platform Delim HexCode Delim (OptionalSection Delim)*
- *
+ * 
  *     OptionalSection ::= Comment | OperandComment | JumpTable | LookupTable
- *
+ * 
  *     Platform ::= "Platform" ISA WordWidth
- *
+ * 
  *     HexCode ::= "HexCode" StartAddress HexDigits
- *
+ * 
  *     Comment ::= "Comment" Position String
- *
+ * 
  *     OperandComment ::= "OperandComment" Position String
- *
+ * 
  *     JumpTable ::= "JumpTable" Position EntrySize Low High
- *
+ * 
  *     LookupTable ::= "LookupTable" Position NPairs KeySize OffsetSize
- *
+ * 
  *     Position, EntrySize, Low, High, NPairs KeySize OffsetSize ::= int
- *
+ * 
  *     Delim := "&lt;||@"
  * </pre>
  *