From 34b0ea8714ccaed6f6036f7c770f365598956753 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 30 Aug 2023 13:23:38 +0200 Subject: [PATCH] Added fix for rhbz#2235654 --- firefox.spec | 7 +++++- rhbz-2235654.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 rhbz-2235654.patch diff --git a/firefox.spec b/firefox.spec index 1bc9345..4abf465 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 117.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -235,6 +235,7 @@ Patch231: fedora-customization.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff +Patch409: rhbz-2235654.patch # PGO/LTO patches Patch600: pgo.patch @@ -509,6 +510,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 +%patch409 -p1 -b .rhbz-2235654 # PGO patches %if %{build_with_pgo} @@ -1066,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 30 2023 Martin Stransky - 117.0-2 +- Added fix for rhbz#2235654 + * Mon Aug 28 2023 Martin Stransky - 117.0-1 - Updated to 117.0 diff --git a/rhbz-2235654.patch b/rhbz-2235654.patch new file mode 100644 index 0000000..0c3780c --- /dev/null +++ b/rhbz-2235654.patch @@ -0,0 +1,59 @@ +diff -up firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h +--- firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure 2023-08-24 20:33:54.000000000 +0200 ++++ firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h 2023-08-30 13:04:56.174949736 +0200 +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } +