mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
31c55fc733
a/hwdata-0.373-noarch-1.txz: Upgraded. a/kernel-firmware-20230731_253cc17-noarch-1.txz: Upgraded. a/kernel-generic-6.1.43-x86_64-1.txz: Upgraded. a/kernel-huge-6.1.43-x86_64-1.txz: Upgraded. a/kernel-modules-6.1.43-x86_64-1.txz: Upgraded. a/sysklogd-2.5.1-x86_64-1.txz: Upgraded. a/xz-5.4.4-x86_64-1.txz: Upgraded. ap/man-pages-6.05.01-noarch-1.txz: Upgraded. d/kernel-headers-6.1.43-x86-1.txz: Upgraded. k/kernel-source-6.1.43-noarch-1.txz: Upgraded. kde/ktextaddons-1.4.0-x86_64-1.txz: Upgraded. l/SDL2-2.28.2-x86_64-1.txz: Upgraded. l/harfbuzz-8.1.1-x86_64-1.txz: Upgraded. l/mozjs102-102.14.0esr-x86_64-1.txz: Upgraded. l/netpbm-11.03.01-x86_64-1.txz: Upgraded. l/openexr-3.1.10-x86_64-1.txz: Upgraded. l/pipewire-0.3.77-x86_64-1.txz: Upgraded. l/poppler-23.08.0-x86_64-1.txz: Upgraded. xap/mozilla-firefox-115.1.0esr-x86_64-1.txz: Upgraded. This update contains security fixes and improvements. For more information, see: https://www.mozilla.org/en-US/firefox/115.1.0esr/releasenotes/ https://www.mozilla.org/en-US/security/advisories/mfsa2023-31/ https://www.cve.org/CVERecord?id=CVE-2023-4045 https://www.cve.org/CVERecord?id=CVE-2023-4046 https://www.cve.org/CVERecord?id=CVE-2023-4047 https://www.cve.org/CVERecord?id=CVE-2023-4048 https://www.cve.org/CVERecord?id=CVE-2023-4049 https://www.cve.org/CVERecord?id=CVE-2023-4050 https://www.cve.org/CVERecord?id=CVE-2023-4052 https://www.cve.org/CVERecord?id=CVE-2023-4054 https://www.cve.org/CVERecord?id=CVE-2023-4055 https://www.cve.org/CVERecord?id=CVE-2023-4056 https://www.cve.org/CVERecord?id=CVE-2023-4057 (* Security fix *) xap/mozilla-thunderbird-115.1.0-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/115.1.0/releasenotes/ isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. testing/packages/rust-1.71.1-x86_64-1.txz: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
77 lines
2.1 KiB
Diff
77 lines
2.1 KiB
Diff
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
|
|
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
|
Date: Sun, 16 Jul 2023 18:18:02 +0300
|
|
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
|
|
instructions within inline assembly
|
|
|
|
Fixes assembling with binutil as >= 2.41
|
|
|
|
Signed-off-by: James Almer <jamrial@gmail.com>
|
|
---
|
|
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
|
|
1 file changed, 23 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
|
|
index 6298f5ed19..ca7e2dffc1 100644
|
|
--- a/libavcodec/x86/mathops.h
|
|
+++ b/libavcodec/x86/mathops.h
|
|
@@ -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;
|
|
}
|
|
|
|
--
|
|
2.30.2
|
|
|
|
|