# HG changeset patch # User Thomas Wuerthinger # Date 1361327275 28800 # Node ID dc497f975c374a7d85e5cba27b8d1707a4fb01a4 # Parent 287ef060b7c093ebca0dc23bd8ca59fa5f429168 Changes in backend due to assembly renamings. Use jccb in two places for smaller code size. diff -r 287ef060b7c0 -r dc497f975c37 graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Tue Feb 19 18:19:02 2013 -0800 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Tue Feb 19 18:27:55 2013 -0800 @@ -730,7 +730,7 @@ public void emitDeoptimizeOnOverflow(DeoptimizationAction action, DeoptimizationReason reason, Object deoptInfo) { LIRFrameState info = state(); LabelRef stubEntry = createDeoptStub(action, reason, info, deoptInfo); - append(new BranchOp(ConditionFlag.overflow, stubEntry, info)); + append(new BranchOp(ConditionFlag.Overflow, stubEntry, info)); } @Override diff -r 287ef060b7c0 -r dc497f975c37 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Tue Feb 19 18:19:02 2013 -0800 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Tue Feb 19 18:27:55 2013 -0800 @@ -297,7 +297,7 @@ Address src = new Address(target.wordKind, receiver.asValue(), config.hubOffset); asm.cmpq(inlineCacheKlass, src); - asm.jcc(ConditionFlag.notEqual, unverifiedStub); + asm.jcc(ConditionFlag.NotEqual, unverifiedStub); } asm.align(config.codeEntryAlignment); diff -r 287ef060b7c0 -r dc497f975c37 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Tue Feb 19 18:19:02 2013 -0800 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Tue Feb 19 18:27:55 2013 -0800 @@ -458,7 +458,7 @@ case Long: masm.cmpq(asLongReg(result), tasm.asLongConstRef(Constant.forLong(java.lang.Long.MIN_VALUE))); break; default: throw GraalInternalError.shouldNotReachHere(); } - masm.jcc(ConditionFlag.equal, slowPath.start); + masm.jcc(ConditionFlag.Equal, slowPath.start); masm.bind(slowPath.continuation); } @@ -482,8 +482,8 @@ default: throw GraalInternalError.shouldNotReachHere(); } Label nan = new Label(); - masm.jcc(ConditionFlag.parity, nan); - masm.jcc(ConditionFlag.below, continuation); + masm.jcc(ConditionFlag.Parity, nan); + masm.jcc(ConditionFlag.Below, continuation); // input is > 0 -> return maxInt // result register already contains 0x80000000, so subtracting 1 gives 0x7fffffff diff -r 287ef060b7c0 -r dc497f975c37 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java Tue Feb 19 18:19:02 2013 -0800 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java Tue Feb 19 18:27:55 2013 -0800 @@ -162,13 +162,13 @@ long lc = keyConstants[i].asLong(); assert NumUtil.isInt(lc); masm.cmpl(intKey, (int) lc); - masm.jcc(ConditionFlag.equal, keyTargets[i].label()); + masm.jcc(ConditionFlag.Equal, keyTargets[i].label()); } } else if (key.getKind() == Kind.Long) { Register longKey = asLongReg(key); for (int i = 0; i < keyConstants.length; i++) { masm.cmpq(longKey, tasm.asLongConstRef(keyConstants[i])); - masm.jcc(ConditionFlag.equal, keyTargets[i].label()); + masm.jcc(ConditionFlag.Equal, keyTargets[i].label()); } } else if (key.getKind() == Kind.Object) { Register intKey = asObjectReg(key); @@ -176,7 +176,7 @@ for (int i = 0; i < keyConstants.length; i++) { AMD64Move.move(tasm, masm, temp.asValue(Kind.Object), keyConstants[i]); masm.cmpptr(intKey, temp); - masm.jcc(ConditionFlag.equal, keyTargets[i].label()); + masm.jcc(ConditionFlag.Equal, keyTargets[i].label()); } } else { throw new GraalInternalError("sequential switch only supported for int, long and object"); @@ -226,15 +226,15 @@ int highKey = highKeys[i]; if (lowKey == highKey) { masm.cmpl(asIntReg(key), lowKey); - masm.jcc(ConditionFlag.equal, keyTargets[i].label()); + masm.jcc(ConditionFlag.Equal, keyTargets[i].label()); skipLowCheck = false; } else { if (!skipLowCheck || (prevHighKey + 1) != lowKey) { masm.cmpl(asIntReg(key), lowKey); - masm.jcc(ConditionFlag.less, actualDefaultTarget); + masm.jcc(ConditionFlag.Less, actualDefaultTarget); } masm.cmpl(asIntReg(key), highKey); - masm.jcc(ConditionFlag.lessEqual, keyTargets[i].label()); + masm.jcc(ConditionFlag.LessEqual, keyTargets[i].label()); skipLowCheck = true; } prevHighKey = highKey; @@ -333,7 +333,7 @@ // Jump to default target if index is not within the jump table if (defaultTarget != null) { - masm.jcc(ConditionFlag.above, defaultTarget.label()); + masm.jcc(ConditionFlag.Above, defaultTarget.label()); } // Set scratch to address of jump table @@ -380,9 +380,9 @@ private static void floatJcc(AMD64MacroAssembler masm, ConditionFlag condition, boolean unorderedIsTrue, Label label) { Label endLabel = new Label(); if (unorderedIsTrue && !trueOnUnordered(condition)) { - masm.jcc(ConditionFlag.parity, label); + masm.jcc(ConditionFlag.Parity, label); } else if (!unorderedIsTrue && trueOnUnordered(condition)) { - masm.jcc(ConditionFlag.parity, endLabel); + masm.jccb(ConditionFlag.Parity, endLabel); } masm.jcc(condition, label); masm.bind(endLabel); @@ -397,9 +397,9 @@ if (isFloat) { if (unorderedIsTrue && !trueOnUnordered(condition)) { - cmove(tasm, masm, result, ConditionFlag.parity, trueValue); + cmove(tasm, masm, result, ConditionFlag.Parity, trueValue); } else if (!unorderedIsTrue && trueOnUnordered(condition)) { - cmove(tasm, masm, result, ConditionFlag.parity, falseValue); + cmove(tasm, masm, result, ConditionFlag.Parity, falseValue); } } } @@ -423,45 +423,45 @@ private static ConditionFlag intCond(Condition cond) { switch (cond) { - case EQ: return ConditionFlag.equal; - case NE: return ConditionFlag.notEqual; - case LT: return ConditionFlag.less; - case LE: return ConditionFlag.lessEqual; - case GE: return ConditionFlag.greaterEqual; - case GT: return ConditionFlag.greater; - case BE: return ConditionFlag.belowEqual; - case AE: return ConditionFlag.aboveEqual; - case AT: return ConditionFlag.above; - case BT: return ConditionFlag.below; + case EQ: return ConditionFlag.Equal; + case NE: return ConditionFlag.NotEqual; + case LT: return ConditionFlag.Less; + case LE: return ConditionFlag.LessEqual; + case GE: return ConditionFlag.GreaterEqual; + case GT: return ConditionFlag.Greater; + case BE: return ConditionFlag.BelowEqual; + case AE: return ConditionFlag.AboveEqual; + case AT: return ConditionFlag.Above; + case BT: return ConditionFlag.Below; default: throw GraalInternalError.shouldNotReachHere(); } } private static ConditionFlag floatCond(Condition cond) { switch (cond) { - case EQ: return ConditionFlag.equal; - case NE: return ConditionFlag.notEqual; - case LT: return ConditionFlag.below; - case LE: return ConditionFlag.belowEqual; - case GE: return ConditionFlag.aboveEqual; - case GT: return ConditionFlag.above; + case EQ: return ConditionFlag.Equal; + case NE: return ConditionFlag.NotEqual; + case LT: return ConditionFlag.Below; + case LE: return ConditionFlag.BelowEqual; + case GE: return ConditionFlag.AboveEqual; + case GT: return ConditionFlag.Above; default: throw GraalInternalError.shouldNotReachHere(); } } private static boolean trueOnUnordered(ConditionFlag condition) { switch(condition) { - case aboveEqual: - case notEqual: - case above: - case less: - case overflow: + case AboveEqual: + case NotEqual: + case Above: + case Less: + case Overflow: return false; - case equal: - case belowEqual: - case below: - case greaterEqual: - case noOverflow: + case Equal: + case BelowEqual: + case Below: + case GreaterEqual: + case NoOverflow: return true; default: throw GraalInternalError.shouldNotReachHere();