# HG changeset patch # User Thomas Wuerthinger # Date 1423081792 -3600 # Node ID bf6eed01c1ef435c694fa0ace4791d9cfabf46ff # Parent 29f2815009d41e4ca8260aaf9fca327b96253413# Parent cd49455040c1d57d8ab74473b3786ecc4f663060 Merge. diff -r 29f2815009d4 -r bf6eed01c1ef 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 Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Wed Feb 04 21:29:52 2015 +0100 @@ -998,7 +998,7 @@ } @Override - public Value emitBitCount(Value value) { + public Variable emitBitCount(Value value) { Variable result = newVariable(LIRKind.derive(value).changeType(Kind.Int)); if (value.getKind().getStackKind() == Kind.Int) { append(new AMD64BitManipulationOp(IPOPCNT, result, asAllocatable(value))); @@ -1009,14 +1009,14 @@ } @Override - public Value emitBitScanForward(Value value) { + public Variable emitBitScanForward(Value value) { Variable result = newVariable(LIRKind.derive(value).changeType(Kind.Int)); append(new AMD64BitManipulationOp(BSF, result, asAllocatable(value))); return result; } @Override - public Value emitBitScanReverse(Value value) { + public Variable emitBitScanReverse(Value value) { Variable result = newVariable(LIRKind.derive(value).changeType(Kind.Int)); if (value.getKind().getStackKind() == Kind.Int) { append(new AMD64BitManipulationOp(IBSR, result, asAllocatable(value))); @@ -1098,14 +1098,14 @@ } @Override - public Value emitByteSwap(Value input) { + public Variable emitByteSwap(Value input) { Variable result = newVariable(LIRKind.derive(input)); append(new AMD64ByteSwapOp(result, input)); return result; } @Override - public Value emitArrayEquals(Kind kind, Value array1, Value array2, Value length) { + public Variable emitArrayEquals(Kind kind, Value array1, Value array2, Value length) { Variable result = newVariable(LIRKind.value(Kind.Int)); append(new AMD64ArrayEqualsOp(this, kind, result, array1, array2, asAllocatable(length))); return result; diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java --- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Wed Feb 04 21:29:52 2015 +0100 @@ -189,7 +189,7 @@ } @Override - public Value emitAddress(StackSlotValue address) { + public Variable emitAddress(StackSlotValue address) { Variable result = newVariable(LIRKind.value(target().wordKind)); append(new StackLoadAddressOp(result, address)); return result; @@ -422,7 +422,7 @@ } @Override - public Value emitBitCount(Value operand) { + public Variable emitBitCount(Value operand) { Variable result = newVariable(LIRKind.derive(operand).changeType(Kind.Int)); if (operand.getKind().getStackKind() == Kind.Int) { append(new SPARCBitManipulationOp(IPOPCNT, result, asAllocatable(operand), this)); @@ -433,14 +433,14 @@ } @Override - public Value emitBitScanForward(Value operand) { + public Variable emitBitScanForward(Value operand) { Variable result = newVariable(LIRKind.derive(operand).changeType(Kind.Int)); append(new SPARCBitManipulationOp(BSF, result, asAllocatable(operand), this)); return result; } @Override - public Value emitBitScanReverse(Value operand) { + public Variable emitBitScanReverse(Value operand) { Variable result = newVariable(LIRKind.derive(operand).changeType(Kind.Int)); if (operand.getKind().getStackKind() == Kind.Int) { append(new SPARCBitManipulationOp(IBSR, result, asAllocatable(operand), this)); @@ -493,14 +493,14 @@ } @Override - public Value emitByteSwap(Value input) { + public Variable emitByteSwap(Value input) { Variable result = newVariable(LIRKind.derive(input)); append(new SPARCByteSwapOp(this, result, input)); return result; } @Override - public Value emitArrayEquals(Kind kind, Value array1, Value array2, Value length) { + public Variable emitArrayEquals(Kind kind, Value array1, Value array2, Value length) { Variable result = newVariable(LIRKind.value(Kind.Int)); append(new SPARCArrayEqualsOp(this, kind, result, load(array1), load(array2), asAllocatable(length))); return result; diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Feb 04 21:29:52 2015 +0100 @@ -527,7 +527,7 @@ } } - public Value emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) { + public Variable emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) { LIRKind kind = newValue.getLIRKind(); assert kind.equals(expectedValue.getLIRKind()); Kind memKind = (Kind) kind.getPlatformKind(); diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Wed Feb 04 21:29:52 2015 +0100 @@ -220,7 +220,7 @@ append(new StoreOp((Kind) kind.getPlatformKind(), storeAddress, input, state)); } - public Value emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) { + public Variable emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) { Variable newValueTemp = newVariable(newValue.getLIRKind()); emitMove(newValueTemp, newValue); diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentLockNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentLockNode.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentLockNode.java Wed Feb 04 21:29:52 2015 +0100 @@ -49,7 +49,7 @@ HotSpotLIRGenerator hsGen = (HotSpotLIRGenerator) gen.getLIRGeneratorTool(); StackSlotValue slot = hsGen.getLockSlot(lockDepth); // The register allocator cannot handle stack -> register moves so we use an LEA here - Value result = gen.getLIRGeneratorTool().emitMove(gen.getLIRGeneratorTool().emitAddress(slot)); + Value result = gen.getLIRGeneratorTool().emitAddress(slot); gen.setResult(this, result); } diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Feb 04 21:29:52 2015 +0100 @@ -119,6 +119,7 @@ @Override public Variable emitMove(Value input) { + assert !(input instanceof Variable) : "Creating a copy of a variable via this method is not supported (and potentially a bug): " + input; Variable result = newVariable(input.getLIRKind()); emitMove(result, input); return result; diff -r 29f2815009d4 -r bf6eed01c1ef graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGeneratorTool.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGeneratorTool.java Wed Feb 04 21:28:56 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGeneratorTool.java Wed Feb 04 21:29:52 2015 +0100 @@ -54,13 +54,13 @@ Value emitLoadConstant(LIRKind kind, Constant constant); - Value emitLoad(LIRKind kind, Value address, LIRFrameState state); + Variable emitLoad(LIRKind kind, Value address, LIRFrameState state); void emitStore(LIRKind kind, Value address, Value input, LIRFrameState state); void emitNullCheck(Value address, LIRFrameState state); - Value emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue); + Variable emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue); /** * Emit an atomic read-and-add instruction. @@ -112,7 +112,7 @@ Value emitAddress(Value base, long displacement, Value index, int scale); - Value emitAddress(StackSlotValue slot); + Variable emitAddress(StackSlotValue slot); void emitMembar(int barriers); @@ -179,15 +179,15 @@ CallingConvention getCallingConvention(); - Value emitBitCount(Value operand); + Variable emitBitCount(Value operand); - Value emitBitScanForward(Value operand); + Variable emitBitScanForward(Value operand); - Value emitBitScanReverse(Value operand); + Variable emitBitScanReverse(Value operand); - Value emitByteSwap(Value operand); + Variable emitByteSwap(Value operand); - Value emitArrayEquals(Kind kind, Value array1, Value array2, Value length); + Variable emitArrayEquals(Kind kind, Value array1, Value array2, Value length); void emitBlackhole(Value operand);