Title: [226147] branches/safari-604.5.100-branch/Source/_javascript_Core
- Revision
- 226147
- Author
- [email protected]
- Date
- 2017-12-19 15:01:30 -0800 (Tue, 19 Dec 2017)
Log Message
Apply patch. rdar://problem/36112003
32-bit fix.
Modified Paths
Diff
Modified: branches/safari-604.5.100-branch/Source/_javascript_Core/assembler/MacroAssembler.h (226146 => 226147)
--- branches/safari-604.5.100-branch/Source/_javascript_Core/assembler/MacroAssembler.h 2017-12-19 23:01:25 UTC (rev 226146)
+++ branches/safari-604.5.100-branch/Source/_javascript_Core/assembler/MacroAssembler.h 2017-12-19 23:01:30 UTC (rev 226147)
@@ -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.5.100-branch/Source/_javascript_Core/jit/AssemblyHelpers.h (226146 => 226147)
--- branches/safari-604.5.100-branch/Source/_javascript_Core/jit/AssemblyHelpers.h 2017-12-19 23:01:25 UTC (rev 226146)
+++ branches/safari-604.5.100-branch/Source/_javascript_Core/jit/AssemblyHelpers.h 2017-12-19 23:01:30 UTC (rev 226147)
@@ -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