Title: [207047] releases/WebKitGTK/webkit-2.14/Source/_javascript_Core
Revision
207047
Author
carlo...@webkit.org
Date
2016-10-10 23:10:49 -0700 (Mon, 10 Oct 2016)

Log Message

Merge r205566 - 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: releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/ChangeLog (207046 => 207047)


--- releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/ChangeLog	2016-10-11 06:10:47 UTC (rev 207046)
+++ releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/ChangeLog	2016-10-11 06:10:49 UTC (rev 207047)
@@ -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  Csaba Osztrogonác  <o...@webkit.org>
 
         Fix the ENABLE(WEBASSEMBLY) build on Linux

Modified: releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/jit/AssemblyHelpers.h (207046 => 207047)


--- releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/jit/AssemblyHelpers.h	2016-10-11 06:10:47 UTC (rev 207046)
+++ releases/WebKitGTK/webkit-2.14/Source/_javascript_Core/jit/AssemblyHelpers.h	2016-10-11 06:10:49 UTC (rev 207047)
@@ -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

Reply via email to