Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
multimedia/x264: IBT fixes
To:
brad@comstyle.com, sthen@openbsd.org, rsadowski@openbsd.org
Cc:
ports@openbsd.org
Date:
Tue, 20 Feb 2024 00:01:59 +0100

Download raw body.

Thread
Same diff as x265.  There is no make test here, but the code is
largely identical so I'm sure this is necessary here as well.

ok?


Index: multimedia/x264/Makefile
===================================================================
RCS file: /cvs/ports/multimedia/x264/Makefile,v
retrieving revision 1.68
diff -u -p -r1.68 Makefile
--- multimedia/x264/Makefile	17 Jun 2023 22:17:46 -0000	1.68
+++ multimedia/x264/Makefile	19 Feb 2024 23:00:42 -0000
@@ -4,7 +4,7 @@ DISTNAME=	x264-20221028
 GH_ACCOUNT=	mirror
 GH_PROJECT=	x264
 GH_COMMIT=	416e3eb2b52abb0a67e57599aba4f8be3003b36d
-REVISION=	1
+REVISION=	2
 CATEGORIES=	multimedia
 
 SHARED_LIBS=	x264	24.0
Index: multimedia/x264/patches/patch-common_x86_x86inc_asm
===================================================================
RCS file: multimedia/x264/patches/patch-common_x86_x86inc_asm
diff -N multimedia/x264/patches/patch-common_x86_x86inc_asm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ multimedia/x264/patches/patch-common_x86_x86inc_asm	19 Feb 2024 23:00:42 -0000
@@ -0,0 +1,13 @@
+Index: common/x86/x86inc.asm
+--- common/x86/x86inc.asm.orig
++++ common/x86/x86inc.asm
+@@ -802,6 +802,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg,
+     %endif
+     align function_align
+     %2:
++    %if ARCH_X86_64
++        endbr64
++    %endif
+     RESET_MM_PERMUTATION        ; needed for x86-64, also makes disassembly somewhat nicer
+     %xdefine rstk rsp           ; copy of the original stack pointer, used when greater alignment than the known stack alignment is required
+     %assign stack_offset 0      ; stack pointer offset relative to the return address