[webkitgtk3/f19] Fix CLoop on s390x and ppc64

Tomas Popela tpopela at fedoraproject.org
Thu May 15 11:44:47 UTC 2014


commit ab1c44967546d1aaafcb7a43c508cc228926128c
Author: Tomas Popela <tpopela at redhat.com>
Date:   Thu May 15 13:44:15 2014 +0200

    Fix CLoop on s390x and ppc64

 webkitgtk-2.0.4-cloop_fix.patch   |   90 +++++++++++++++++++++++++++++++++++++
 webkitgtk-2.0.4-ppc64_align.patch |   45 ++++++++++++++++++
 webkitgtk3.spec                   |   14 +++++-
 3 files changed, 148 insertions(+), 1 deletions(-)
---
diff --git a/webkitgtk-2.0.4-cloop_fix.patch b/webkitgtk-2.0.4-cloop_fix.patch
new file mode 100644
index 0000000..63ff18b
--- /dev/null
+++ b/webkitgtk-2.0.4-cloop_fix.patch
@@ -0,0 +1,90 @@
+diff -up webkitgtk-2.0.4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm.cloop_fix webkitgtk-2.0.4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+--- webkitgtk-2.0.4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm.cloop_fix	2014-05-12 15:38:39.748538807 +0200
++++ webkitgtk-2.0.4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm	2014-05-12 15:36:46.908580462 +0200
+@@ -541,7 +541,7 @@ end
+ 
+ macro putToBaseVariableBody(variableOffset, scratch1, scratch2, scratch3)
+     loadisFromInstruction(1, scratch1)
+-    loadp PayloadOffset[cfr, scratch1, 8], scratch1
++    loadp [cfr, scratch1, 8], scratch1
+     loadp JSVariableObject::m_registers[scratch1], scratch1
+     loadisFromInstruction(3, scratch2)
+     if JSVALUE64
+@@ -667,7 +667,7 @@ _llint_op_resolve_global_var:
+ macro resolveScopedVarBody(resolveOperations)
+     # First ResolveOperation is to skip scope chain nodes
+     getScope(macro(dest)
+-                 loadp ScopeChain + PayloadOffset[cfr], dest
++                 loadp ScopeChain[cfr], dest
+              end,
+              ResolveOperation::m_scopesToSkip[resolveOperations], t1, t2)
+     loadp JSVariableObject::m_registers[t1], t1 # t1 now contains the activation registers
+@@ -692,7 +692,7 @@ _llint_op_resolve_scoped_var_on_top_scop
+     loadisFromInstruction(1, t3)
+ 
+     # We know we want the top scope chain entry
+-    loadp ScopeChain + PayloadOffset[cfr], t1
++    loadp ScopeChain[cfr], t1
+     loadp JSVariableObject::m_registers[t1], t1 # t1 now contains the activation registers
+     
+     # Second ResolveOperation tells us what offset to use
+@@ -707,14 +707,14 @@ _llint_op_resolve_scoped_var_with_top_sc
+     # First ResolveOperation tells us what register to check
+     loadis ResolveOperation::m_activationRegister[t0], t1
+ 
+-    loadp PayloadOffset[cfr, t1, 8], t1
++    loadp [cfr, t1, 8], t1
+ 
+     getScope(macro(dest)
+                  btpz t1, .scopeChainNotCreated
+                      loadp JSScope::m_next[t1], dest
+                  jmp .done
+                  .scopeChainNotCreated:
+-                     loadp ScopeChain + PayloadOffset[cfr], dest
++                     loadp ScopeChain[cfr], dest
+                  .done:
+              end, 
+              # Second ResolveOperation tells us how many more nodes to skip
+@@ -769,7 +769,7 @@ _llint_op_resolve_base_to_scope:
+     getResolveOperation(4, t0)
+     # First ResolveOperation is to skip scope chain nodes
+     getScope(macro(dest)
+-                 loadp ScopeChain + PayloadOffset[cfr], dest
++                 loadp ScopeChain[cfr], dest
+              end,
+              ResolveOperation::m_scopesToSkip[t0], t1, t2)
+     loadisFromInstruction(1, t3)
+@@ -787,14 +787,14 @@ _llint_op_resolve_base_to_scope_with_top
+     # First ResolveOperation tells us what register to check
+     loadis ResolveOperation::m_activationRegister[t0], t1
+ 
+-    loadp PayloadOffset[cfr, t1, 8], t1
++    loadp [cfr, t1, 8], t1
+ 
+     getScope(macro(dest)
+                  btpz t1, .scopeChainNotCreated
+                      loadp JSScope::m_next[t1], dest
+                  jmp .done
+                  .scopeChainNotCreated:
+-                     loadp ScopeChain + PayloadOffset[cfr], dest
++                     loadp ScopeChain[cfr], dest
+                  .done:
+              end, 
+              # Second ResolveOperation tells us how many more nodes to skip
+@@ -839,14 +839,14 @@ macro interpretResolveWithBase(opcodeLen
+ 
+     bineq t2, ResolveOperationSkipTopScopeNode, .notSkipTopScopeNode
+         loadis ResolveOperation::m_activationRegister[t0], t1
+-        loadp PayloadOffset[cfr, t1, 8], t1
++        loadp [cfr, t1, 8], t1
+ 
+         getScope(macro(dest)
+                      btpz t1, .scopeChainNotCreated
+                          loadp JSScope::m_next[t1], dest
+                      jmp .done
+                      .scopeChainNotCreated:
+-                         loadp ScopeChain + PayloadOffset[cfr], dest
++                          loadp ScopeChain[cfr], dest
+                      .done:
+                  end,
+                  sizeof ResolveOperation + ResolveOperation::m_scopesToSkip[t0], t1, t2)
diff --git a/webkitgtk-2.0.4-ppc64_align.patch b/webkitgtk-2.0.4-ppc64_align.patch
new file mode 100644
index 0000000..108396c
--- /dev/null
+++ b/webkitgtk-2.0.4-ppc64_align.patch
@@ -0,0 +1,45 @@
+diff -up webkitgtk-2.0.4/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align webkitgtk-2.0.4/Source/JavaScriptCore/heap/CopiedBlock.h
+--- webkitgtk-2.0.4/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align	2014-05-07 11:13:48.249690429 +0200
++++ webkitgtk-2.0.4/Source/JavaScriptCore/heap/CopiedBlock.h	2014-05-07 11:14:02.442872375 +0200
+@@ -77,7 +77,7 @@ public:
+     size_t size();
+     size_t capacity();
+ 
+-    static const size_t blockSize = 32 * KB;
++    static const size_t blockSize = 64 * KB;
+ 
+     bool hasWorkList();
+     CopyWorkList& workList();
+diff -up webkitgtk-2.0.4/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align webkitgtk-2.0.4/Source/JavaScriptCore/interpreter/JSStack.cpp
+--- webkitgtk-2.0.4/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align	2014-05-07 11:14:17.785069040 +0200
++++ webkitgtk-2.0.4/Source/JavaScriptCore/interpreter/JSStack.cpp	2014-05-07 11:15:15.610810268 +0200
+@@ -49,7 +49,8 @@ JSStack::JSStack(JSGlobalData& globalDat
+ {
+     ASSERT(capacity && isPageAligned(capacity));
+ 
+-    m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity * sizeof(Register), commitSize), OSAllocator::JSVMStackPages);
++    size_t commitsize = pageSize();
++    m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity * sizeof(Register), commitsize), OSAllocator::JSVMStackPages);
+     m_end = static_cast<Register*>(m_reservation.base());
+     m_commitEnd = static_cast<Register*>(m_reservation.base());
+ 
+@@ -78,7 +79,8 @@ bool JSStack::growSlowCase(Register* new
+     // Compute the chunk size of additional memory to commit, and see if we
+     // have it is still within our budget. If not, we'll fail to grow and
+     // return false.
+-    long delta = roundUpAllocationSize(reinterpret_cast<char*>(newEnd) - reinterpret_cast<char*>(m_commitEnd), commitSize);
++    size_t commitsize = pageSize();
++    long delta = roundUpAllocationSize(reinterpret_cast<char*>(newEnd) - reinterpret_cast<char*>(m_commitEnd), commitsize);
+     if (reinterpret_cast<char*>(m_commitEnd) + delta > reinterpret_cast<char*>(m_useableEnd))
+         return false;
+ 
+@@ -134,7 +136,8 @@ void JSStack::enableErrorStackReserve()
+ 
+ void JSStack::disableErrorStackReserve()
+ {
+-    char* useableEnd = reinterpret_cast<char*>(reservationEnd()) - commitSize;
++    size_t commitsize = pageSize();
++    char* useableEnd = reinterpret_cast<char*>(reservationEnd()) - commitsize;
+     m_useableEnd = reinterpret_cast<Register*>(useableEnd);
+ 
+     // By the time we get here, we are guaranteed to be destructing the last
diff --git a/webkitgtk3.spec b/webkitgtk3.spec
index 97a4945..128f47f 100644
--- a/webkitgtk3.spec
+++ b/webkitgtk3.spec
@@ -7,7 +7,7 @@
 
 Name:           webkitgtk3
 Version:        2.0.4
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        GTK+ Web content engine library
 
 Group:          Development/Libraries
@@ -24,6 +24,8 @@ Patch1:         webkit-1.11.2-yarr.patch
 Patch2:         webkit-1.11.2-Double2Ints.patch
 Patch3:         webkitgtk-1.11.5-libatomic.patch
 Patch4:         webkit-1.11.90-double2intsPPC32.patch
+Patch5:         webkitgtk-2.0.4-ppc64_align.patch
+Patch6:         webkitgtk-2.0.4-cloop_fix.patch
 
 BuildRequires:  bison
 BuildRequires:  cairo-devel
@@ -108,6 +110,13 @@ This package contains developer documentation for %{name}.
 %ifarch ppc s390
 %patch4 -p1 -b .double2intsPPC32
 %endif
+%ifarch ppc64
+%patch5 -p1 -b .ppc64_align
+%endif
+
+%ifarch ppc64 s390x
+%patch6 -p1 -b .cloop_fix
+%endif
 
 %build
 # Use linker flags to reduce memory consumption
@@ -222,6 +231,9 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -delete
 
 
 %changelog
+* Thu May 15 2014 Tomas Popela <tpopela at redhat.com> - 2.0.4-3
+- Fix CLoop on s390x and ppc64
+
 * Wed Oct 2 2013 Tomas Popela <tpopela at redhat.com> - 2.0.4-2
 - Rebase webkitgtk-1.11.5-libatomic.patch for ppc
 


More information about the scm-commits mailing list