Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/76572@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ojhunt committed May 20, 2011
1 parent 810c7e4 commit ab4e83a02805e633ff3f0c1bac9628e222cc69b2
Showing with 13 additions and 10 deletions.
  1. +13 −0 Source/JavaScriptCore/ChangeLog
  2. +0 −10 Source/JavaScriptCore/jit/JITArithmetic32_64.cpp
@@ -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.
@@ -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());

0 comments on commit ab4e83a

Please sign in to comment.