Mercurial > hg > graal-jvmci-8
changeset 17020:5c1bc769563e
Merge
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Fri, 29 Aug 2014 16:05:30 -0700 |
parents | 1013a8444746 (diff) 5d16da2ca0c8 (current diff) |
children | c2437c80c253 |
files | |
diffstat | 3 files changed, 30 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Fri Aug 29 15:21:39 2014 -0700 +++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Fri Aug 29 16:05:30 2014 -0700 @@ -224,7 +224,6 @@ double trueDestinationProbability) { boolean mirrored = emitCompare(cmpKind, left, right); Condition finalCondition = mirrored ? cond.mirror() : cond; - boolean finalUnorderedIsTrue = mirrored ? !unorderedIsTrue : unorderedIsTrue; Kind kind = left.getKind().getStackKind(); switch (kind) { @@ -235,7 +234,7 @@ break; case Float: case Double: - append(new BranchOp(finalCondition, trueDestination, falseDestination, kind, finalUnorderedIsTrue)); + append(new BranchOp(finalCondition, trueDestination, falseDestination, kind, unorderedIsTrue)); break; default: throw GraalInternalError.shouldNotReachHere("" + left.getKind()); @@ -756,10 +755,10 @@ Variable result = newVariable(LIRKind.derive(a, b)); switch (a.getKind().getStackKind()) { case Int: - append(new Op2Stack(IXOR, result, a, loadNonConst(b))); + append(new Op2Stack(IXOR, result, load(a), loadNonConst(b))); break; case Long: - append(new Op2Stack(LXOR, result, a, loadNonConst(b))); + append(new Op2Stack(LXOR, result, load(a), loadNonConst(b))); break; default: throw GraalInternalError.shouldNotReachHere();
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArithmetic.java Fri Aug 29 15:21:39 2014 -0700 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArithmetic.java Fri Aug 29 16:05:30 2014 -0700 @@ -738,7 +738,7 @@ new Sra(asIntReg(dst), 16, asIntReg(dst)).emit(masm); break; case I2F: - if (src.getPlatformKind() == Kind.Int) { + if (src.getPlatformKind() == Kind.Int || src.getPlatformKind() == Kind.Char || src.getPlatformKind() == Kind.Short || src.getPlatformKind() == Kind.Byte) { new Movwtos(asIntReg(src), asFloatReg(dst)).emit(masm); new Fitos(asFloatReg(dst), asFloatReg(dst)).emit(masm); } else if (src.getPlatformKind() == Kind.Float) {
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCControlFlow.java Fri Aug 29 15:21:39 2014 -0700 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCControlFlow.java Fri Aug 29 16:05:30 2014 -0700 @@ -139,28 +139,44 @@ } private static void emitFloatCompare(SPARCMacroAssembler masm, Label target, Condition actualCondition, boolean branchOnUnordered) { - if (branchOnUnordered) { - // new Fbu(false, target).emit(masm); - // new Nop().emit(masm); - } switch (actualCondition) { case EQ: - new Fbe(false, target).emit(masm); + if (branchOnUnordered) { + new Fbue(false, target).emit(masm); + } else { + new Fbe(false, target).emit(masm); + } break; case NE: - new Fbne(false, target).emit(masm); + new Fbne(false, target).emit(masm); // Is also unordered break; case LT: - new Fbl(false, target).emit(masm); + if (branchOnUnordered) { + new Fbul(false, target).emit(masm); + } else { + new Fbl(false, target).emit(masm); + } break; case LE: - new Fble(false, target).emit(masm); + if (branchOnUnordered) { + new Fbule(false, target).emit(masm); + } else { + new Fble(false, target).emit(masm); + } break; case GT: - new Fbg(false, target).emit(masm); + if (branchOnUnordered) { + new Fbug(false, target).emit(masm); + } else { + new Fbg(false, target).emit(masm); + } break; case GE: - new Fbge(false, target).emit(masm); + if (branchOnUnordered) { + new Fbuge(false, target).emit(masm); + } else { + new Fbge(false, target).emit(masm); + } break; case AE: case AT: