ARMv7 version of DFG soft modulo does register allocation inside of control flow
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 23:08:35 +0000 (23:08 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 23:08:35 +0000 (23:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74354

Reviewed by Gavin Barraclough.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileSoftModulo):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

index 3d4e5da..e3a5dd3 100644 (file)
@@ -1,3 +1,13 @@
+2011-12-12  Filip Pizlo  <fpizlo@apple.com>
+
+        ARMv7 version of DFG soft modulo does register allocation inside of control flow
+        https://bugs.webkit.org/show_bug.cgi?id=74354
+
+        Reviewed by Gavin Barraclough.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileSoftModulo):
+
 2011-12-12  Andy Wingo  <wingo@igalia.com>
 
         Simplify autotools configure.ac
index 95b6f5c..d9d8485 100644 (file)
@@ -1980,6 +1980,8 @@ void SpeculativeJIT::compileSoftModulo(Node& node)
 #else
     GPRTemporary result(this);
     GPRTemporary scratch(this);
+    GPRTemporary scratch3(this);
+    GPRReg scratchGPR3 = scratch3.gpr();
     GPRReg resultGPR = result.gpr();
     GPRReg scratchGPR = scratch.gpr();
 #endif
@@ -2029,8 +2031,6 @@ void SpeculativeJIT::compileSoftModulo(Node& node)
     m_jit.assembler().cdq();
     m_jit.assembler().idivl_r(scratchGPR2);
 #elif CPU(ARM_THUMB2)
-    GPRTemporary scratch3(this);
-    GPRReg scratchGPR3 = scratch3.gpr();
     m_jit.countLeadingZeros32(scratchGPR2, scratchGPR);
     m_jit.countLeadingZeros32(resultGPR, scratchGPR3);
     m_jit.sub32(scratchGPR3, scratchGPR);