# HG changeset patch # User Bernhard Urban # Date 1371540729 -7200 # Node ID 9c4e6767ab7811d7a0e9f7c974aad94a497514f7 # Parent 25de9c96a032af96b5a43932dc0df4e6070791b1 Value/Register: replace object identity check with equals() diff -r 25de9c96a032 -r 9c4e6767ab78 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 Tue Jun 18 09:00:33 2013 +0200 +++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Tue Jun 18 09:32:09 2013 +0200 @@ -419,7 +419,7 @@ baseRegister = asAllocatable(base); } - if (index != Value.ILLEGAL && scale != 0) { + if (!Value.ILLEGAL.equals(index) && scale != 0) { if (isConstant(index)) { finalDisp += asConstant(index).asLong() * scale; } else { @@ -430,7 +430,7 @@ indexRegister = index; } - if (baseRegister == Value.ILLEGAL) { + if (Value.ILLEGAL.equals(baseRegister)) { baseRegister = asAllocatable(indexRegister); } else { Variable newBase = newVariable(Kind.Int); diff -r 25de9c96a032 -r 9c4e6767ab78 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java Tue Jun 18 09:00:33 2013 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java Tue Jun 18 09:32:09 2013 +0200 @@ -644,7 +644,7 @@ protected static void compareAndSwapCompressed(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AllocatableValue result, AMD64AddressValue address, AllocatableValue cmpValue, AllocatableValue newValue, AllocatableValue scratch, long narrowOopBase, int narrowOopShift, int logMinObjAlignment) { - assert asRegister(cmpValue) == AMD64.rax && asRegister(result) == AMD64.rax; + assert AMD64.rax.equals(asRegister(cmpValue)) && AMD64.rax.equals(asRegister(result)); final Register scratchRegister = asRegister(scratch); final Register cmpRegister = asRegister(cmpValue); final Register newRegister = asRegister(newValue);