[webkitgtk3/f20] Fix CLoop on s390x and ppc64 Disable yarr jit through flag and don't use patch for it
Tomas Popela
tpopela at fedoraproject.org
Thu May 15 11:30:19 UTC 2014
commit fcab65587bb65f16c190432c7c6eea987b39f938
Author: Tomas Popela <tpopela at redhat.com>
Date: Thu May 15 13:29:21 2014 +0200
Fix CLoop on s390x and ppc64
Disable yarr jit through flag and don't use patch for it
webkitgtk-2.1.1-yarr.patch | 12 -----
webkitgtk-2.2.7-cloop_fix.patch | 99 +++++++++++++++++++++++++++++++++++++
webkitgtk-2.2.7-ppc64_align.patch | 45 +++++++++++++++++
webkitgtk3.spec | 20 ++++++--
4 files changed, 159 insertions(+), 17 deletions(-)
---
diff --git a/webkitgtk-2.2.7-cloop_fix.patch b/webkitgtk-2.2.7-cloop_fix.patch
new file mode 100644
index 0000000..9cede59
--- /dev/null
+++ b/webkitgtk-2.2.7-cloop_fix.patch
@@ -0,0 +1,99 @@
+diff -up webkitgtk-2.2.7/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix webkitgtk-2.2.7/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+--- webkitgtk-2.2.7/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix 2014-05-07 10:24:59.955718943 +0200
++++ webkitgtk-2.2.7/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp 2014-05-07 10:25:46.442309954 +0200
+@@ -1303,7 +1303,7 @@ LLINT_SLOW_PATH_DECL(slow_path_get_from_
+ CodeBlock* codeBlock = exec->codeBlock();
+ ConcurrentJITLocker locker(codeBlock->m_lock);
+ pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), scope->structure());
+- pc[6].u.operand = slot.cachedOffset();
++ pc[6].u.pointer = reinterpret_cast<void*>(slot.cachedOffset());
+ }
+ }
+
+@@ -1330,7 +1330,7 @@ LLINT_SLOW_PATH_DECL(slow_path_put_to_sc
+ if (slot.isCacheable() && slot.base() == scope && scope->structure()->propertyAccessesAreCacheable()) {
+ ConcurrentJITLocker locker(codeBlock->m_lock);
+ pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), scope->structure());
+- pc[6].u.operand = slot.cachedOffset();
++ pc[6].u.pointer = reinterpret_cast<void*>(slot.cachedOffset());
+ }
+ }
+
+diff -up webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm.cloop_fix webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+--- webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm.cloop_fix 2014-05-07 10:26:57.907218695 +0200
++++ webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm 2014-05-07 10:27:30.130628506 +0200
+@@ -1954,7 +1954,7 @@ macro loadWithStructureCheck(operand, sl
+ end
+
+ macro getProperty()
+- loadisFromInstruction(6, t3)
++ loadpFromInstruction(6, t3)
+ loadPropertyAtVariableOffset(t3, t0, t1, t2)
+ valueProfile(t1, t2, 28, t0)
+ loadisFromInstruction(1, t0)
+@@ -1974,7 +1974,7 @@ end
+
+ macro getClosureVar()
+ loadp JSVariableObject::m_registers[t0], t0
+- loadisFromInstruction(6, t3)
++ loadpFromInstruction(6, t3)
+ loadp TagOffset[t0, t3, 8], t1
+ loadp PayloadOffset[t0, t3, 8], t2
+ valueProfile(t1, t2, 28, t0)
+@@ -2033,7 +2033,7 @@ _llint_op_get_from_scope:
+ macro putProperty()
+ loadisFromInstruction(3, t1)
+ loadConstantOrVariable(t1, t2, t3)
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ storePropertyAtVariableOffset(t1, t0, t2, t3)
+ end
+
+@@ -2049,7 +2049,7 @@ macro putClosureVar()
+ loadisFromInstruction(3, t1)
+ loadConstantOrVariable(t1, t2, t3)
+ loadp JSVariableObject::m_registers[t0], t0
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ storei t2, TagOffset[t0, t1, 8]
+ storei t3, PayloadOffset[t0, t1, 8]
+ end
+diff -up webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+--- webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix 2014-05-07 10:27:03.061284240 +0200
++++ webkitgtk-2.2.7/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm 2014-05-07 10:28:09.922134622 +0200
+@@ -1750,7 +1750,7 @@ macro loadWithStructureCheck(operand, sl
+ end
+
+ macro getProperty()
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ loadPropertyAtVariableOffset(t1, t0, t2)
+ valueProfile(t2, 7, t0)
+ loadisFromInstruction(1, t0)
+@@ -1767,7 +1767,7 @@ end
+
+ macro getClosureVar()
+ loadp JSVariableObject::m_registers[t0], t0
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ loadq [t0, t1, 8], t0
+ valueProfile(t0, 7, t1)
+ loadisFromInstruction(1, t1)
+@@ -1824,7 +1824,7 @@ _llint_op_get_from_scope:
+ macro putProperty()
+ loadisFromInstruction(3, t1)
+ loadConstantOrVariable(t1, t2)
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ storePropertyAtVariableOffset(t1, t0, t2)
+ end
+
+@@ -1839,7 +1839,7 @@ macro putClosureVar()
+ loadisFromInstruction(3, t1)
+ loadConstantOrVariable(t1, t2)
+ loadp JSVariableObject::m_registers[t0], t0
+- loadisFromInstruction(6, t1)
++ loadpFromInstruction(6, t1)
+ storeq t2, [t0, t1, 8]
+ end
+
diff --git a/webkitgtk-2.2.7-ppc64_align.patch b/webkitgtk-2.2.7-ppc64_align.patch
new file mode 100644
index 0000000..b755db9
--- /dev/null
+++ b/webkitgtk-2.2.7-ppc64_align.patch
@@ -0,0 +1,45 @@
+diff -up webkitgtk-2.2.7/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align webkitgtk-2.2.7/Source/JavaScriptCore/heap/CopiedBlock.h
+--- webkitgtk-2.2.7/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align 2014-05-07 10:37:02.784916768 +0200
++++ webkitgtk-2.2.7/Source/JavaScriptCore/heap/CopiedBlock.h 2014-05-07 10:37:12.989046714 +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.2.7/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align webkitgtk-2.2.7/Source/JavaScriptCore/interpreter/JSStack.cpp
+--- webkitgtk-2.2.7/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align 2014-05-07 10:41:27.450289748 +0200
++++ webkitgtk-2.2.7/Source/JavaScriptCore/interpreter/JSStack.cpp 2014-05-07 10:44:15.672468824 +0200
+@@ -49,7 +49,8 @@ JSStack::JSStack(VM& vm, size_t capacity
+ {
+ 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_ptr<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 814d917..e988457 100644
--- a/webkitgtk3.spec
+++ b/webkitgtk3.spec
@@ -7,7 +7,7 @@
Name: webkitgtk3
Version: 2.2.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GTK+ Web content engine library
Group: Development/Libraries
@@ -17,11 +17,10 @@ URL: http://www.webkitgtk.org/
Source0: http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
Patch0: webkit-1.1.14-nspluginwrapper.patch
-# workarounds for non-JIT arches
-# https://bugs.webkit.org/show_bug.cgi?id=104270
-Patch1: webkitgtk-2.1.1-yarr.patch
# https://bugs.webkit.org/show_bug.cgi?id=103128
Patch4: webkit-2.1.90-double2intsPPC32.patch
+Patch5: webkitgtk-2.2.7-cloop_fix.patch
+Patch6: webkitgtk-2.2.7-ppc64_align.patch
BuildRequires: at-spi2-core-devel
BuildRequires: bison
@@ -92,10 +91,13 @@ This package contains developer documentation for %{name}.
%prep
%setup -qn "webkitgtk-%{version}"
%patch0 -p1 -b .nspluginwrapper
-%patch1 -p1 -b .yarr
+%patch5 -p1 -b .cloop_fix
%ifarch ppc s390
%patch4 -p1 -b .double2intsPPC32
%endif
+%ifarch ppc64
+%patch6 -p1 -b .ppc64_align
+%endif
%build
# Use linker flags to reduce memory consumption
@@ -106,6 +108,10 @@ This package contains developer documentation for %{name}.
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
+%ifarch s390 s390x ppc ppc64 aarch64
+%global optflags %{optflags} -DENABLE_YARR_JIT=0
+%endif
+
%ifarch ppc
# Use linker flag -relax to get WebKit2 build under ppc(32) with JIT disabled
%global optflags %{optflags} -Wl,-relax
@@ -211,6 +217,10 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -delete
%changelog
+* Wed May 7 2014 Tomas Popela <tpopela at redhat.com> - 2.2.7-2
+- Fix CLoop on s390x and ppc64
+- Disable yarr jit through flag and don't use patch for it
+
* Mon May 5 2014 Tomas Popela <tpopela at redhat.com> - 2.2.7-1
- Update to 2.2.7
More information about the scm-commits
mailing list