changeset 3479:d6e8ca089e4b

don't create special case for reminder calculation (not necessary, because Long.MIN_VALUE / -1 is 0 anyway)
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 03 Aug 2011 19:19:15 -0700
parents bdeb4ba46a30
children a5b02018b843
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }
 
--- 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);