2011-05-20 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 18:20:07 +0000 (18:20 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 18:20:07 +0000 (18:20 +0000)
        Reviewed by Sam Weinig.

        Remove unnecessary double->int conversion at the end of op_div
        https://bugs.webkit.org/show_bug.cgi?id=61198

        We don't attempt this conversion on 64bit, removing it actually speeds
        up sunspider and v8 slightly, and it reduces code size.

        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emit_op_div):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86968 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITArithmetic32_64.cpp

index 8e664c3..2e8cd30 100644 (file)
@@ -1,3 +1,16 @@
+2011-05-20  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Remove unnecessary double->int conversion at the end of op_div
+        https://bugs.webkit.org/show_bug.cgi?id=61198
+
+        We don't attempt this conversion on 64bit, removing it actually speeds
+        up sunspider and v8 slightly, and it reduces code size.
+
+        * jit/JITArithmetic32_64.cpp:
+        (JSC::JIT::emit_op_div):
+
 2011-05-19  Evan Martin  <evan@chromium.org>
 
         Reviewed by Tony Chang.
index 6865489..50cd86f 100644 (file)
@@ -1246,16 +1246,6 @@ void JIT::emit_op_div(Instruction* currentInstruction)
     convertInt32ToDouble(regT0, fpRegT0);
     convertInt32ToDouble(regT2, fpRegT1);
     divDouble(fpRegT1, fpRegT0);
-
-    JumpList doubleResult;
-    branchConvertDoubleToInt32(fpRegT0, regT0, doubleResult, fpRegT1);
-
-    // Int32 result.
-    emitStoreInt32(dst, regT0, (op1 == dst || op2 == dst));
-    end.append(jump());
-
-    // Double result.
-    doubleResult.link(this);
     emitStoreDouble(dst, fpRegT0);
     end.append(jump());