# HG changeset patch # User Christian Wimmer # Date 1357614625 28800 # Node ID 91b52ccdb8b7c7d16201b978bd58b1e9ee6af867 # Parent cd205ca515dd02bde6d069ffbee8cc56a17cde93 Rely on deoptimization to handle x86 division exceptions diff -r cd205ca515dd -r 91b52ccdb8b7 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Mon Jan 07 19:08:26 2013 -0800 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Mon Jan 07 19:10:25 2013 -0800 @@ -319,22 +319,9 @@ case LDIV: case LREM: - Label continuation = new Label(); - if (opcode == LDIV) { - // 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); - masm.cmpq(asRegister(src), -1); - masm.jcc(ConditionFlag.equal, continuation); - masm.bind(normalCase); - } - masm.cdqq(); exceptionOffset = masm.codeBuffer.position(); masm.idivq(asRegister(src)); - masm.bind(continuation); break; case IUDIV: