Title: [91578] trunk/Source/_javascript_Core
Revision
91578
Author
[email protected]
Date
2011-07-22 11:25:57 -0700 (Fri, 22 Jul 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=65036
Messing with the register allocation within flow control = badness.

Reviewed by Sam Weinig.

* dfg/DFGNonSpeculativeJIT.cpp:
(JSC::DFG::NonSpeculativeJIT::compile):
    - Fix register allocation.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (91577 => 91578)


--- trunk/Source/_javascript_Core/ChangeLog	2011-07-22 18:12:32 UTC (rev 91577)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-07-22 18:25:57 UTC (rev 91578)
@@ -1,3 +1,14 @@
+2011-07-22  Gavin Barraclough  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=65036
+        Messing with the register allocation within flow control = badness.
+
+        Reviewed by Sam Weinig.
+
+        * dfg/DFGNonSpeculativeJIT.cpp:
+        (JSC::DFG::NonSpeculativeJIT::compile):
+            - Fix register allocation.
+
 2011-07-22  Mark Hahnenberg  <[email protected]>
 
         Date.prototype.toISOString doesn't handle negative years or years > 9999 correctly.

Modified: trunk/Source/_javascript_Core/dfg/DFGNonSpeculativeJIT.cpp (91577 => 91578)


--- trunk/Source/_javascript_Core/dfg/DFGNonSpeculativeJIT.cpp	2011-07-22 18:12:32 UTC (rev 91577)
+++ trunk/Source/_javascript_Core/dfg/DFGNonSpeculativeJIT.cpp	2011-07-22 18:25:57 UTC (rev 91578)
@@ -550,6 +550,13 @@
         op1.use();
         op2.use();
     
+        GPRReg temp2 = InvalidGPRReg;
+        if (op2GPR == X86Registers::eax || op2GPR == X86Registers::edx) {
+            temp2 = allocate();
+            m_jit.move(op2GPR, temp2);
+            op2GPR = temp2;
+        }
+    
         JITCompiler::Jump firstOpNotInt;
         JITCompiler::Jump secondOpNotInt;
         JITCompiler::JumpList done;
@@ -562,20 +569,10 @@
     
         modByZero = m_jit.branchTest32(MacroAssembler::Zero, op2GPR);
     
-        GPRReg temp2 = InvalidGPRReg;
-        if (op2GPR == X86Registers::eax || op2GPR == X86Registers::edx) {
-            temp2 = allocate();
-            m_jit.move(op2GPR, temp2);
-            op2GPR = temp2;
-        }
-    
         m_jit.move(op1GPR, eax.gpr());
         m_jit.assembler().cdq();
         m_jit.assembler().idivl_r(op2GPR);
     
-        if (temp2 != InvalidGPRReg)
-            unlock(temp2);
-    
         m_jit.orPtr(GPRInfo::tagTypeNumberRegister, X86Registers::edx);
     
         done.append(m_jit.jump());
@@ -635,6 +632,9 @@
         
         done.link(&m_jit);
     
+        if (temp2 != InvalidGPRReg)
+            unlock(temp2);
+    
         jsValueResult(X86Registers::edx, m_compileIndex, UseChildrenCalledExplicitly);
         break;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to