Title: [205566] trunk/Source/_javascript_Core
- Revision
- 205566
- Author
- fpi...@apple.com
- Date
- 2016-09-07 13:21:46 -0700 (Wed, 07 Sep 2016)
Log Message
Make emitAllocateWithNonNullAllocator's sub32() disallow-scratch-friendly
https://bugs.webkit.org/show_bug.cgi?id=161706
Reviewed by Geoffrey Garen.
You can't sub32(Addr, Reg) on not-x86 without using a scratch register. So, on those CPUs, we
have to do something different.
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (205565 => 205566)
--- trunk/Source/_javascript_Core/ChangeLog 2016-09-07 20:19:48 UTC (rev 205565)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-09-07 20:21:46 UTC (rev 205566)
@@ -1,3 +1,16 @@
+2016-09-07 Filip Pizlo <fpi...@apple.com>
+
+ Make emitAllocateWithNonNullAllocator's sub32() disallow-scratch-friendly
+ https://bugs.webkit.org/show_bug.cgi?id=161706
+
+ Reviewed by Geoffrey Garen.
+
+ You can't sub32(Addr, Reg) on not-x86 without using a scratch register. So, on those CPUs, we
+ have to do something different.
+
+ * jit/AssemblyHelpers.h:
+ (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
+
2016-09-07 Michael Catanzaro <mcatanz...@igalia.com>
Unreviewed CMake build fix after r205552
Modified: trunk/Source/_javascript_Core/jit/AssemblyHelpers.h (205565 => 205566)
--- trunk/Source/_javascript_Core/jit/AssemblyHelpers.h 2016-09-07 20:19:48 UTC (rev 205565)
+++ trunk/Source/_javascript_Core/jit/AssemblyHelpers.h 2016-09-07 20:21:46 UTC (rev 205566)
@@ -1427,8 +1427,15 @@
if (allocator)
add32(TrustedImm32(-allocator->cellSize()), resultGPR, scratchGPR);
else {
- move(resultGPR, scratchGPR);
- sub32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
+ if (isX86()) {
+ move(resultGPR, scratchGPR);
+ sub32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
+ } else {
+ // FIXME: We need a 3-operand sub, and ARM totally has it!
+ load32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
+ neg32(scratchGPR);
+ add32(resultGPR, scratchGPR);
+ }
}
negPtr(resultGPR);
store32(scratchGPR, Address(allocatorGPR, MarkedAllocator::offsetOfFreeList() + OBJECT_OFFSETOF(FreeList, remaining)));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes