summaryrefslogtreecommitdiff
path: root/graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm')
-rw-r--r--graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm b/graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm
new file mode 100644
index 0000000..ad08b16
--- /dev/null
+++ b/graphics/ffmpeg/patches/patch-libavutil_x86_x86inc_asm
@@ -0,0 +1,27 @@
1- define _CET_ENDBR depending X86_64 / X86
2- use it in cglobal macro
3
4Index: libavutil/x86/x86inc.asm
5--- libavutil/x86/x86inc.asm.orig
6+++ libavutil/x86/x86inc.asm
7@@ -53,6 +53,12 @@
8 %endif
9 %endif
10
11+%if ARCH_X86_64
12+ %define _CET_ENDBR endbr64
13+%else
14+ %define _CET_ENDBR
15+%endif
16+
17 %define WIN64 0
18 %define UNIX64 0
19 %if ARCH_X86_64
20@@ -746,6 +752,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg,
21 %endif
22 align function_align
23 %2:
24+ _CET_ENDBR
25 RESET_MM_PERMUTATION ; needed for x86-64, also makes disassembly somewhat nicer
26 %xdefine rstk rsp ; copy of the original stack pointer, used when greater alignment than the known stack alignment is required
27 %assign stack_offset 0 ; stack pointer offset relative to the return address