Title: [198013] releases/WebKitGTK/webkit-2.12/Source/_javascript_Core
Revision
198013
Author
[email protected]
Date
2016-03-11 06:14:11 -0800 (Fri, 11 Mar 2016)

Log Message

Merge r197685 - [JSC] Remove a useless "Move" from baseline-JIT op_mul's fast path
https://bugs.webkit.org/show_bug.cgi?id=155071

Reviewed by Geoffrey Garen.

We do not need to multiply to a scratch and then move the result
to the destination. We can just multiply to the destination.

* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mul):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateFastPath):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (198012 => 198013)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-11 14:05:55 UTC (rev 198012)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-11 14:14:11 UTC (rev 198013)
@@ -1,3 +1,18 @@
+2016-03-07  Benjamin Poulain  <[email protected]>
+
+        [JSC] Remove a useless "Move" from baseline-JIT op_mul's fast path
+        https://bugs.webkit.org/show_bug.cgi?id=155071
+
+        Reviewed by Geoffrey Garen.
+
+        We do not need to multiply to a scratch and then move the result
+        to the destination. We can just multiply to the destination.
+
+        * jit/JITArithmetic.cpp:
+        (JSC::JIT::emit_op_mul):
+        * jit/JITMulGenerator.cpp:
+        (JSC::JITMulGenerator::generateFastPath):
+
 2016-03-06  Benjamin Poulain  <[email protected]>
 
         [JSC] Improve DFG's Int32 ArithMul if one operand is a constant

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITArithmetic.cpp (198012 => 198013)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITArithmetic.cpp	2016-03-11 14:05:55 UTC (rev 198012)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITArithmetic.cpp	2016-03-11 14:14:11 UTC (rev 198013)
@@ -822,8 +822,8 @@
 #if USE(JSVALUE64)
     JSValueRegs leftRegs = JSValueRegs(regT0);
     JSValueRegs rightRegs = JSValueRegs(regT1);
-    JSValueRegs resultRegs = leftRegs;
-    GPRReg scratchGPR = regT2;
+    JSValueRegs resultRegs = JSValueRegs(regT2);
+    GPRReg scratchGPR = regT3;
     FPRReg scratchFPR = InvalidFPRReg;
 #else
     JSValueRegs leftRegs = JSValueRegs(regT1, regT0);

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITMulGenerator.cpp (198012 => 198013)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITMulGenerator.cpp	2016-03-11 14:05:55 UTC (rev 198012)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jit/JITMulGenerator.cpp	2016-03-11 14:14:11 UTC (rev 198013)
@@ -60,9 +60,13 @@
         // Try to do intVar * intConstant.
         CCallHelpers::Jump notInt32 = jit.branchIfNotInt32(var);
 
-        m_slowPathJumpList.append(jit.branchMul32(CCallHelpers::Overflow, var.payloadGPR(), CCallHelpers::Imm32(constOpr.asConstInt32()), m_scratchGPR));
+        GPRReg multiplyResultGPR = m_result.payloadGPR();
+        if (multiplyResultGPR == var.payloadGPR())
+            multiplyResultGPR = m_scratchGPR;
 
-        jit.boxInt32(m_scratchGPR, m_result);
+        m_slowPathJumpList.append(jit.branchMul32(CCallHelpers::Overflow, var.payloadGPR(), CCallHelpers::Imm32(constOpr.asConstInt32()), multiplyResultGPR));
+
+        jit.boxInt32(multiplyResultGPR, m_result);
         m_endJumpList.append(jit.jump());
 
         if (!jit.supportsFloatingPoint()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to