From 164c801d46b4cef06d7c6357c5121cdbca5bffe7 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Mon, 26 May 2014 09:07:16 +0200 Subject: [PATCH] Fix CLoop on s390x and ppc64 --- webkitgtk-2.0.4-cloop_fix.patch | 90 +++++++++++++++++++++++++++++++ webkitgtk-2.0.4-ppc64_align.patch | 45 ++++++++++++++++ webkitgtk.spec | 13 ++++- 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 webkitgtk-2.0.4-cloop_fix.patch create mode 100644 webkitgtk-2.0.4-ppc64_align.patch 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(m_reservation.base()); + m_commitEnd = static_cast(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(newEnd) - reinterpret_cast(m_commitEnd), commitSize); ++ size_t commitsize = pageSize(); ++ long delta = roundUpAllocationSize(reinterpret_cast(newEnd) - reinterpret_cast(m_commitEnd), commitsize); + if (reinterpret_cast(m_commitEnd) + delta > reinterpret_cast(m_useableEnd)) + return false; + +@@ -134,7 +136,8 @@ void JSStack::enableErrorStackReserve() + + void JSStack::disableErrorStackReserve() + { +- char* useableEnd = reinterpret_cast(reservationEnd()) - commitSize; ++ size_t commitsize = pageSize(); ++ char* useableEnd = reinterpret_cast(reservationEnd()) - commitsize; + m_useableEnd = reinterpret_cast(useableEnd); + + // By the time we get here, we are guaranteed to be destructing the last diff --git a/webkitgtk.spec b/webkitgtk.spec index 14a8472..e3ebd95 100644 --- a/webkitgtk.spec +++ b/webkitgtk.spec @@ -7,7 +7,7 @@ Name: webkitgtk Version: 2.0.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK+ Web content engine library Group: Development/Libraries @@ -25,6 +25,8 @@ Patch1: webkit-1.11.2-yarr.patch Patch2: webkit-1.11.2-Double2Ints.patch Patch3: webkitgtk-2.0.4-libatomic.patch Patch4: webkit-1.11.90-double2intsPPC32.patch +Patch5: webkitgtk-2.0.4-cloop_fix.patch +Patch6: webkitgtk-2.0.4-ppc64_align.patch BuildRequires: bison BuildRequires: chrpath @@ -99,6 +101,12 @@ This package contains developer documentation for %{name}. %ifarch ppc s390 %patch4 -p1 -b .double2intsPPC32 %endif +%ifarch ppc64 s390x +%patch5 -p1 -b .cloop_fix +%endif +%ifarch ppc64 +%patch6 -p1 -b .ppc64_align +%endif # Needed for patch5: autoreconf --verbose --install -I Source/autotools @@ -209,6 +217,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %changelog +* Mon May 26 2014 Tomas Popela - 2.0.4-3 +- Fix CLoop on s390x and ppc64 + * Wed May 07 2014 Karsten Hopp 2.0.4-2 - update libatomic patch (PPC)