Mercurial > hg > graal-compiler
changeset 10077:9c4e6767ab78
Value/Register: replace object identity check with equals()
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Tue, 18 Jun 2013 09:32:09 +0200 |
parents | 25de9c96a032 |
children | 77772d794ffd |
files | graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);