# HG changeset patch # User Thomas Wuerthinger # Date 1312424355 25200 # Node ID d6e8ca089e4b3f07afa977bc45fc99cbf5a5bf51 # Parent bdeb4ba46a30134b577253683fa032fd31231e43 don't create special case for reminder calculation (not necessary, because Long.MIN_VALUE / -1 is 0 anyway) diff -r bdeb4ba46a30 -r d6e8ca089e4b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java Wed Aug 03 17:27:44 2011 -0700 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java Wed Aug 03 19:19:15 2011 -0700 @@ -53,7 +53,7 @@ /** * The instruction that produces the object tested against null. */ - public Value object() { + public Value object() { return (Value) inputs().get(super.inputCount() + INPUT_OBJECT); } diff -r bdeb4ba46a30 -r d6e8ca089e4b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java Wed Aug 03 17:27:44 2011 -0700 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java Wed Aug 03 19:19:15 2011 -0700 @@ -1141,16 +1141,12 @@ Label continuation = new Label(); - if (GraalOptions.GenSpecialDivChecks) { + if (GraalOptions.GenSpecialDivChecks && code == LIROpcode.Div) { // check for special case of Long.MIN_VALUE / -1 Label normalCase = new Label(); masm.movq(AMD64.rdx, java.lang.Long.MIN_VALUE); masm.cmpq(AMD64.rax, AMD64.rdx); masm.jcc(ConditionFlag.notEqual, normalCase); - if (code == LIROpcode.Lrem) { - // prepare X86Register.rdx for possible special case (where remainder = 0) - masm.xorq(AMD64.rdx, AMD64.rdx); - } masm.cmpl(rreg, -1); masm.jcc(ConditionFlag.equal, continuation);