added mozilla-ppc.patch
authorWolfgang Rosenauer <wr@rosenauer.org>
Thu, 19 Jul 2012 20:46:14 +0200
changeset 507 d51ca95a9f7a
parent 506 f02147953485
child 508 3e7bfc2dd452
added mozilla-ppc.patch
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/mozilla-ppc.patch
mozilla-ppc.patch
series
xulrunner/mozilla-ppc.patch
xulrunner/xulrunner.spec
--- a/MozillaFirefox/MozillaFirefox.spec	Thu Jul 19 20:44:57 2012 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Thu Jul 19 20:46:14 2012 +0200
@@ -97,6 +97,7 @@
 Patch13:        mozilla-arm-disable-edsp.patch
 Patch14:        mozilla-crashreporter-restart-args.patch
 Patch15:        mozilla-gstreamer.patch
+Patch16:        mozilla-ppc.patch
 # Firefox/browser
 Patch30:        firefox-browser-css.patch
 Patch31:        firefox-kde.patch
@@ -226,6 +227,7 @@
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
 #
 %patch30 -p1
 %if %suse_version >= 1110
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-ppc.patch	Thu Jul 19 20:46:14 2012 +0200
@@ -0,0 +1,1 @@
+../mozilla-ppc.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-ppc.patch	Thu Jul 19 20:46:14 2012 +0200
@@ -0,0 +1,114 @@
+# HG changeset patch
+# Parent 0f6722dd9d75458124795d22e9240887c9b4aeca
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+Bug 746112 - RegExp hang on ppc64 in execute.
+Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15
+
+diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h
+--- a/js/src/yarr/YarrInterpreter.h
++++ b/js/src/yarr/YarrInterpreter.h
+@@ -162,17 +162,17 @@ struct ByteTerm {
+         , m_invert(invert)
+     {
+         atom.characterClass = characterClass;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+         inputPosition = inputPos;
+     }
+ 
+-    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos)
++    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(false)
+     {
+         atom.subpatternId = subpatternId;
+         atom.parenthesesDisjunction = parenthesesInfo;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+@@ -183,17 +183,17 @@ struct ByteTerm {
+         : type(type)
+         , m_capture(false)
+         , m_invert(invert)
+     {
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+     }
+ 
+-    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos)
++    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(invert)
+     {
+         atom.subpatternId = subpatternId;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+         inputPosition = inputPos;
+diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
+--- a/js/src/yarr/YarrPattern.h
++++ b/js/src/yarr/YarrPattern.h
+@@ -166,17 +166,17 @@ struct PatternTerm {
+         , m_capture(false)
+         , m_invert(invert)
+     {
+         characterClass = charClass;
+         quantityType = QuantifierFixedCount;
+         quantityCount = 1;
+     }
+ 
+-    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)
++    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(invert)
+     {
+         parentheses.disjunction = disjunction;
+         parentheses.subpatternId = subpatternId;
+         parentheses.isCopy = false;
+         parentheses.isTerminal = false;
+diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
+--- a/memory/jemalloc/jemalloc.c
++++ b/memory/jemalloc/jemalloc.c
+@@ -1086,17 +1086,19 @@ struct arena_s {
+ static unsigned		ncpus;
+ #endif
+ 
+ /*
+  * When MALLOC_STATIC_SIZES is defined most of the parameters
+  * controlling the malloc behavior are defined as compile-time constants
+  * for best performance and cannot be altered at runtime.
+  */
++#if !(defined(__powerpc__))
+ #define MALLOC_STATIC_SIZES 1
++#endif
+ 
+ #ifdef MALLOC_STATIC_SIZES
+ 
+ /*
+  * VM page size. It must divide the runtime CPU page size or the code
+  * will abort.
+  */
+ #define pagesize_2pow			((size_t) 12)
+diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
+--- a/mfbt/double-conversion/utils.h
++++ b/mfbt/double-conversion/utils.h
+@@ -50,17 +50,17 @@
+ // the result is equal to 89255e-22.
+ // The best way to test this, is to create a division-function and to compare
+ // the output of the division with the expected result. (Inlining must be
+ // disabled.)
+ // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
+ #if defined(_M_X64) || defined(__x86_64__) || \
+     defined(__ARMEL__) || defined(__avr32__) || \
+     defined(__hppa__) || defined(__ia64__) || \
+-    defined(__mips__) || defined(__powerpc__) || \
++    defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
+ #if defined(_WIN32)
+ // Windows uses a 64bit wide floating point stack.
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
--- a/series	Thu Jul 19 20:44:57 2012 +0200
+++ b/series	Thu Jul 19 20:46:14 2012 +0200
@@ -17,6 +17,7 @@
 mozilla-arm-disable-edsp.patch
 mozilla-crashreporter-restart-args.patch
 mozilla-gstreamer.patch
+mozilla-ppc.patch
 #mozilla-disable-neon-option.patch
 #mozilla-yarr-pcre.patch
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xulrunner/mozilla-ppc.patch	Thu Jul 19 20:46:14 2012 +0200
@@ -0,0 +1,1 @@
+../mozilla-ppc.patch
\ No newline at end of file
--- a/xulrunner/xulrunner.spec	Thu Jul 19 20:44:57 2012 +0200
+++ b/xulrunner/xulrunner.spec	Thu Jul 19 20:46:14 2012 +0200
@@ -80,6 +80,7 @@
 Patch11:        mozilla-yarr-pcre.patch
 Patch12:        mozilla-crashreporter-restart-args.patch
 Patch13:        mozilla-gstreamer.patch
+Patch14:        mozilla-ppc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       mozilla-js = %{version}
 Requires(post):  update-alternatives coreutils
@@ -197,6 +198,7 @@
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 %build
 # no need to add build time to binaries