Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-04-18 18:42:04 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-04-18 18:42:04 +0200
commitb5bd72a494367c8be09989235503bbdbc018cd81 (patch)
tree89c4e676653d32b79b67122a46d8f9df1f08751a /extra
parent9cdd5461faf257c973977b881f7ee2083baf852c (diff)
extra/firefox: added patch from Parabola for i686 SIMD removal
Diffstat (limited to 'extra')
-rw-r--r--extra/firefox/PKGBUILD11
-rw-r--r--extra/firefox/fix-i686-xsimd-incomplete.patch29
2 files changed, 40 insertions, 0 deletions
diff --git a/extra/firefox/PKGBUILD b/extra/firefox/PKGBUILD
index b5dc7982..172abdf7 100644
--- a/extra/firefox/PKGBUILD
+++ b/extra/firefox/PKGBUILD
@@ -248,3 +248,14 @@ eval "$(
$ i patch -p1 -i "$srcdir/fix-i686-build-moz-1792159.patch"
'
)"
+
+# from Parabola (thanks go to bill-auger)
+source+=('fix-i686-xsimd-incomplete.patch')
+sha256sums+=('c3ce181fbb0142055aa6dd17f3cda2ba6a1e54d7a689a8c6e9cce76aa40e6544')
+b2sums+=('3e6fd4cebe0fd4c250ccf5b04e12b93e5f4cc2d139301316c987cc07a57b4b6b49b830d745520a82f5ac59da8d17f728a3ecce4dccf21804a2d6a256a6f76472')
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/fix-i686-xsimd-incomplete.patch"
+ '
+)"
diff --git a/extra/firefox/fix-i686-xsimd-incomplete.patch b/extra/firefox/fix-i686-xsimd-incomplete.patch
new file mode 100644
index 00000000..c0df0054
--- /dev/null
+++ b/extra/firefox/fix-i686-xsimd-incomplete.patch
@@ -0,0 +1,29 @@
+diff --git a/dom/base/nsTextFragmentGeneric.h b/dom/base/nsTextFragmentGeneric.h
+index 10e16fcfaa..87d9e0d075 100644
+--- a/dom/base/nsTextFragmentGeneric.h
++++ b/dom/base/nsTextFragmentGeneric.h
+@@ -13,7 +13,6 @@ namespace mozilla {
+
+ template <class Arch>
+ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
+- const uint32_t numUnicharsPerVector = xsimd::batch<int16_t, Arch>::size;
+ using p = Non8BitParameters<sizeof(size_t)>;
+ const size_t mask = p::mask();
+ const uint32_t numUnicharsPerWord = p::numUnicharsPerWord();
+@@ -28,16 +27,6 @@ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
+ if (str[i] > 255) return i;
+ }
+
+- // Check one batch at a time.
+- const int32_t vectWalkEnd =
+- ((len - i) / numUnicharsPerVector) * numUnicharsPerVector;
+- const uint16_t shortMask = 0xff00;
+- xsimd::batch<int16_t, Arch> vectmask(static_cast<int16_t>(shortMask));
+- for (; i < vectWalkEnd; i += numUnicharsPerVector) {
+- const auto vect = xsimd::batch<int16_t, Arch>::load_aligned(str + i);
+- if (xsimd::any((vect & vectmask) != 0)) return i;
+- }
+-
+ // Check one word at a time.
+ const int32_t wordWalkEnd =
+ ((len - i) / numUnicharsPerWord) * numUnicharsPerWord;