Index | Thread | Search

From:
Robert Nagy <robert@openbsd.org>
Subject:
Re: multimedia/libvpx: ENDBR64
To:
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc:
ports@openbsd.org, kettenis@openbsd.org, brad@comstyle.com, rsadowski@openbsd.org
Date:
Sat, 24 Feb 2024 18:34:10 +0100

Download raw body.

Thread
works, ok

On 24/02/24 18:30 +0100, Mark Kettenis wrote:
> The asm in this port seems to have some x265 heritage.  So there is a
> x86inc.asm file that we can patch.  But it uses yasm instead of nasm
> and yasm doesn't know about endbr64.  So just dump the bytes for that
> instruction into place.
> 
> Seems to be fix playing youtube vids in chromium again.
> 
> ok?
> 
> 
> Index: multimedia/libvpx/Makefile
> ===================================================================
> RCS file: /cvs/ports/multimedia/libvpx/Makefile,v
> retrieving revision 1.54
> diff -u -p -r1.54 Makefile
> --- multimedia/libvpx/Makefile	8 Feb 2024 13:39:39 -0000	1.54
> +++ multimedia/libvpx/Makefile	24 Feb 2024 17:29:40 -0000
> @@ -6,7 +6,7 @@ GH_TAGNAME=	v1.13.1
>  EPOCH=		0
>  CATEGORIES=	multimedia
>  
> -REVISION=	1
> +REVISION=	2
>  
>  SHARED_LIBS=	vpx	16.0
>  
> Index: multimedia/libvpx/patches/patch-third_party_x86inc_x86inc_asm
> ===================================================================
> RCS file: multimedia/libvpx/patches/patch-third_party_x86inc_x86inc_asm
> diff -N multimedia/libvpx/patches/patch-third_party_x86inc_x86inc_asm
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ multimedia/libvpx/patches/patch-third_party_x86inc_x86inc_asm	24 Feb 2024 17:29:40 -0000
> @@ -0,0 +1,13 @@
> +Index: third_party/x86inc/x86inc.asm
> +--- third_party/x86inc/x86inc.asm.orig
> ++++ third_party/x86inc/x86inc.asm
> +@@ -860,6 +860,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg,
> +     %endif
> +     align function_align
> +     %2:
> ++    %if VPX_ARCH_X86_64
> ++        dd 0xfa1e0ff3
> ++    %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

-- 
Regards,
Robert Nagy