Update to 2.4.2

Fix for CLoop on ppc64, ppc64le and s390x
This commit is contained in:
Tomas Popela 2014-05-15 16:16:52 +02:00
parent 7845573ec5
commit c07ecba9d4
5 changed files with 283 additions and 14 deletions

View File

@ -1 +1 @@
c57ebecff1ba7663b303e21a64840c48 webkitgtk-2.4.1.tar.xz
da2b1b0f0863f3f21bdbc0476001589f webkitgtk-2.4.2.tar.xz

View File

@ -0,0 +1,138 @@
diff -up webkitgtk-2.4.1/Source/JavaScriptCore/interpreter/ProtoCallFrame.h.cloop_fix webkitgtk-2.4.1/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
--- webkitgtk-2.4.1/Source/JavaScriptCore/interpreter/ProtoCallFrame.h.cloop_fix 2014-04-14 08:40:44.000000000 +0200
+++ webkitgtk-2.4.1/Source/JavaScriptCore/interpreter/ProtoCallFrame.h 2014-04-30 16:10:49.120156216 +0200
@@ -36,7 +36,7 @@ struct ProtoCallFrame {
Register calleeValue;
Register argCountAndCodeOriginValue;
Register thisArg;
- size_t paddedArgCount;
+ uint32_t paddedArgCount;
JSValue *args;
void init(CodeBlock*, JSScope*, JSObject*, JSValue, int, JSValue* otherArgs = 0);
@@ -53,7 +53,7 @@ struct ProtoCallFrame {
int argumentCountIncludingThis() const { return argCountAndCodeOriginValue.payload(); }
int argumentCount() const { return argumentCountIncludingThis() - 1; }
void setArgumentCountIncludingThis(int count) { argCountAndCodeOriginValue.payload() = count; }
- void setPaddedArgsCount(size_t argCount) { paddedArgCount = argCount; }
+ void setPaddedArgsCount(uint32_t argCount) { paddedArgCount = argCount; }
void clearCurrentVPC() { argCountAndCodeOriginValue.tag() = 0; }
diff -up webkitgtk-2.4.1/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix webkitgtk-2.4.1/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
--- webkitgtk-2.4.1/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix 2014-04-30 16:11:18.457540050 +0200
+++ webkitgtk-2.4.1/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp 2014-04-30 16:11:50.944965101 +0200
@@ -1354,7 +1354,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());
}
}
@@ -1381,7 +1381,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.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm.cloop_fix webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
--- webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm.cloop_fix 2014-04-14 08:40:44.000000000 +0200
+++ webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm 2014-04-30 16:12:35.648549985 +0200
@@ -282,7 +282,7 @@ macro doCallToJavaScript(makeCall, doRet
storep temp3, CodeBlock+4[cfr, temp1, 8]
btinz temp1, .copyHeaderLoop
- loadi ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
+ loadi PayloadOffset + ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
subi 1, temp2
loadi ProtoCallFrame::paddedArgCount[protoCallFrame], temp3
subi 1, temp3
@@ -2277,7 +2277,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)
@@ -2297,7 +2297,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)
@@ -2356,7 +2356,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
@@ -2374,7 +2374,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.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
--- webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix 2014-04-14 08:40:44.000000000 +0200
+++ webkitgtk-2.4.1/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm 2014-04-30 16:10:49.121156229 +0200
@@ -171,7 +171,7 @@ macro doCallToJavaScript(makeCall, doRet
storep temp3, CodeBlock[cfr, temp1, 8]
btinz temp1, .copyHeaderLoop
- loadi ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
+ loadi PayloadOffset + ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
subi 1, temp2
loadi ProtoCallFrame::paddedArgCount[protoCallFrame], temp3
subi 1, temp3
@@ -2047,7 +2047,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)
@@ -2064,7 +2064,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)
@@ -2121,7 +2121,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
@@ -2138,7 +2138,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

View File

@ -0,0 +1,45 @@
diff -up webkitgtk-2.4.2/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align webkitgtk-2.4.2/Source/JavaScriptCore/heap/CopiedBlock.h
--- webkitgtk-2.4.2/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align 2014-05-12 08:03:53.000000000 +0200
+++ webkitgtk-2.4.2/Source/JavaScriptCore/heap/CopiedBlock.h 2014-05-14 15:16:36.946318596 +0200
@@ -81,7 +81,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.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align webkitgtk-2.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp
--- webkitgtk-2.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align 2014-05-12 08:03:53.000000000 +0200
+++ webkitgtk-2.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp 2014-05-14 15:17:35.617171141 +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);
updateStackLimit(highAddress());
m_commitEnd = highAddress();
@@ -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*>(m_commitEnd) - reinterpret_cast<char*>(newEnd), commitSize);
+ size_t commitsize = pageSize();
+ long delta = roundUpAllocationSize(reinterpret_cast<char*>(m_commitEnd) - reinterpret_cast<char*>(newEnd), 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

View File

@ -0,0 +1,69 @@
diff -up webkitgtk-2.4.2/Source/WTF/wtf/dtoa/utils.h.ppc64le webkitgtk-2.4.2/Source/WTF/wtf/dtoa/utils.h
--- webkitgtk-2.4.2/Source/WTF/wtf/dtoa/utils.h.ppc64le 2014-05-14 15:37:26.360159487 +0200
+++ webkitgtk-2.4.2/Source/WTF/wtf/dtoa/utils.h 2014-05-14 15:38:46.938315499 +0200
@@ -49,7 +49,7 @@
defined(__ARMEL__) || \
defined(_MIPS_ARCH_MIPS32R2)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
-#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
+#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || OS(WINCE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__)
#if defined(_WIN32)
diff -up webkitgtk-2.4.2/Source/WTF/wtf/Platform.h.ppc64le webkitgtk-2.4.2/Source/WTF/wtf/Platform.h
--- webkitgtk-2.4.2/Source/WTF/wtf/Platform.h.ppc64le 2014-05-12 08:03:53.000000000 +0200
+++ webkitgtk-2.4.2/Source/WTF/wtf/Platform.h 2014-05-14 15:39:08.402622454 +0200
@@ -101,24 +101,38 @@
#endif /* MIPS */
/* CPU(PPC) - PowerPC 32-bit */
-#if defined(__ppc__) \
+#if ( defined(__ppc__) \
|| defined(__PPC__) \
|| defined(__powerpc__) \
|| defined(__powerpc) \
|| defined(__POWERPC__) \
|| defined(_M_PPC) \
- || defined(__PPC)
+ || defined(__PPC)) \
+ && defined(__BYTE_ORDER__) \
+ && (__BYTE_ORDER__==__ORDER_BIG_ENDIAN__)
#define WTF_CPU_PPC 1
#define WTF_CPU_BIG_ENDIAN 1
#endif
-/* CPU(PPC64) - PowerPC 64-bit */
-#if defined(__ppc64__) \
- || defined(__PPC64__)
+/* CPU(PPC64) - PowerPC 64-bit Big Endian */
+#if ( defined(__ppc64__) \
+ || defined(__PPC64__)) \
+ && defined(__BYTE_ORDER__) \
+ && (__BYTE_ORDER__==__ORDER_BIG_ENDIAN__)
#define WTF_CPU_PPC64 1
#define WTF_CPU_BIG_ENDIAN 1
#endif
+/* CPU(PPC64) - PowerPC 64-bit Little Endian */
+#if ( defined(__ppc64__) \
+ || defined(__PPC64__) \
+ || defined(__ppc64le__) \
+ || defined(__PPC64LE__)) \
+ && defined(__BYTE_ORDER__) \
+ && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__)
+#define WTF_CPU_PPC64LE 1
+#endif
+
/* CPU(SH4) - SuperH SH-4 */
#if defined(__SH4__)
#define WTF_CPU_SH4 1
@@ -641,7 +655,8 @@
|| CPU(ALPHA) \
|| CPU(ARM64) \
|| CPU(S390X) \
- || CPU(PPC64)
+ || CPU(PPC64) \
+ || CPU(PPC64LE)
#define WTF_USE_JSVALUE64 1
#else
#define WTF_USE_JSVALUE32_64 1

View File

@ -9,8 +9,8 @@
cp -p %1 %{buildroot}%{_pkgdocdir}/$(echo '%1' | sed -e 's!/!.!g')
Name: webkitgtk
Version: 2.4.1
Release: 2%{?dist}
Version: 2.4.2
Release: 1%{?dist}
Summary: GTK+ Web content engine library
Group: Development/Libraries
@ -23,7 +23,10 @@ Source0: http://www.webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
Patch0: webkit-1.3.10-nspluginwrapper.patch
# https://bugs.webkit.org/show_bug.cgi?id=103128
Patch4: webkit-2.1.90-double2intsPPC32.patch
Patch10: webkitgtk-aarch64.patch
Patch5: webkitgtk-aarch64.patch
Patch6: webkitgtk-2.4.1-cloop_fix.patch
Patch7: webkitgtk-2.4.1-ppc64_align.patch
Patch8: webkitgtk-2.4.2-ppc64le.patch
BuildRequires: bison
BuildRequires: chrpath
@ -91,31 +94,41 @@ This package contains developer documentation for %{name}.
%ifarch ppc s390
%patch4 -p1 -b .double2intsPPC32
%endif
%patch10 -p1 -b .aarch64
%ifarch aarch64
%patch5 -p1 -b .aarch64
%endif
%ifarch %{power64} s390x
%patch6 -p1 -b .cloop_fix
%endif
%ifarch %{power64}
%patch7 -p1 -b .ppc64_align
%endif
%patch8 -p1 -b .ppc64le
%build
%ifarch s390 %{arm} ppc
# Use linker flags to reduce memory consumption on low-mem architectures
%global optflags %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
%endif
%ifarch s390
%ifarch s390 %{arm}
# Decrease debuginfo verbosity to reduce memory consumption even more
%global optflags %(echo %{optflags} | sed 's/-g/-g1/')
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
%ifarch ppc
# Use linker flag -relax to get WebKit2 build under ppc(32) with JIT disabled
%global optflags %{optflags} -Wl,-relax
# Use linker flag -relax to get WebKit build under ppc(32) with JIT disabled
%global optflags %{optflags} -Wl,-relax -latomic
%endif
# Build with -g1 on all platforms to avoid running into 4 GB ar format limit
# https://bugs.webkit.org/show_bug.cgi?id=91154
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%ifarch s390 s390x ppc %{power64} aarch64
%global optflags %{optflags} -DENABLE_YARR_JIT=0
%endif
CFLAGS="%{optflags} -DLIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY" %configure \
%configure \
--with-gtk=2.0 \
--disable-webkit2 \
%ifarch s390 s390x ppc ppc64 aarch64
%ifarch s390 s390x ppc %{power64} aarch64
--disable-jit \
%else
--enable-jit \
@ -201,6 +214,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_datadir}/gtk-doc/html/webkitgtk
%changelog
* Thu May 15 2014 Tomas Popela <tpopela@redhat.com> 2.4.2-1
- Update to 2.4.2
- Fix for CLoop on ppc64, ppc64le and s390x
* Fri Apr 25 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.4.1-2
- Switch over to geoclue2