Title: [226548] branches/safari-604.4.7.0-branch/Source/_javascript_Core
Revision
226548
Author
[email protected]
Date
2018-01-08 14:42:10 -0800 (Mon, 08 Jan 2018)

Log Message

Apply patch. rdar://problem/36113365

    32-bit fix.

Modified Paths

Diff

Modified: branches/safari-604.4.7.0-branch/Source/_javascript_Core/assembler/MacroAssembler.h (226547 => 226548)


--- branches/safari-604.4.7.0-branch/Source/_javascript_Core/assembler/MacroAssembler.h	2018-01-08 22:42:07 UTC (rev 226547)
+++ branches/safari-604.4.7.0-branch/Source/_javascript_Core/assembler/MacroAssembler.h	2018-01-08 22:42:10 UTC (rev 226548)
@@ -593,6 +593,11 @@
         urshift32(trustedImm32ForShift(imm), srcDest);
     }
 
+    void urshiftPtr(RegisterID shiftAmmount, RegisterID srcDest)
+    {
+        urshift32(shiftAmmount, srcDest);
+    }
+
     void negPtr(RegisterID dest)
     {
         neg32(dest);
@@ -902,6 +907,11 @@
         urshift64(trustedImm32ForShift(imm), srcDest);
     }
 
+    void urshiftPtr(RegisterID shiftAmmount, RegisterID srcDest)
+    {
+        urshift64(shiftAmmount, srcDest);
+    }
+
     void negPtr(RegisterID dest)
     {
         neg64(dest);

Modified: branches/safari-604.4.7.0-branch/Source/_javascript_Core/jit/AssemblyHelpers.h (226547 => 226548)


--- branches/safari-604.4.7.0-branch/Source/_javascript_Core/jit/AssemblyHelpers.h	2018-01-08 22:42:07 UTC (rev 226547)
+++ branches/safari-604.4.7.0-branch/Source/_javascript_Core/jit/AssemblyHelpers.h	2018-01-08 22:42:10 UTC (rev 226548)
@@ -1442,10 +1442,20 @@
 
     void emitComputeButterflyIndexingMask(GPRReg vectorLengthGPR, GPRReg scratchGPR, GPRReg resultGPR)
     {
+        ASSERT(scratchGPR != resultGPR);
+        Jump done;
+        if (isX86() && !isX86_64()) {
+            Jump nonZero = branchTest32(NonZero, vectorLengthGPR);
+            move(TrustedImm32(0), resultGPR);
+            done = jump();
+            nonZero.link(this);
+        }
         // If vectorLength == 0 then clz will return 32 on both ARM and x86. On 64-bit systems, we can then do a 64-bit right shift on a 32-bit -1 to get a 0 mask for zero vectorLength. On 32-bit ARM, shift masks with 0xff, which means it will still create a 0 mask.
         countLeadingZeros32(vectorLengthGPR, scratchGPR);
         move(TrustedImm32(-1), resultGPR);
-        urshift64(scratchGPR, resultGPR);
+        urshiftPtr(scratchGPR, resultGPR);
+        if (done.isSet())
+            done.link(this);
     }
 
     // Call this if you know that the value held in allocatorGPR is non-null. This DOES NOT mean
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to