libjpeg-turbo/libjpeg-turbo-CET.patch

1251 lines
40 KiB
Diff

From ec7dcec4d423b8af21ef32381de5a4c1f7a541ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Thu, 3 Dec 2020 18:19:33 +0100
Subject: [PATCH] x86 SIMD: Add endbr32/endbr64 instructions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Allow for indirect branch tracking with Intel CET (Control-Flow
Enforcement Technology) [1], by making all exported routines a possible
target for an indirect jump.
Signed-off-by: Nikola Forró <nforro@redhat.com>
[1] https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf
---
simd/i386/jccolext-avx2.asm | 1 +
simd/i386/jccolext-mmx.asm | 1 +
simd/i386/jccolext-sse2.asm | 1 +
simd/i386/jcgryext-avx2.asm | 1 +
simd/i386/jcgryext-mmx.asm | 1 +
simd/i386/jcgryext-sse2.asm | 1 +
simd/i386/jchuff-sse2.asm | 1 +
simd/i386/jcphuff-sse2.asm | 2 ++
simd/i386/jcsample-avx2.asm | 2 ++
simd/i386/jcsample-mmx.asm | 2 ++
simd/i386/jcsample-sse2.asm | 2 ++
simd/i386/jdcolext-avx2.asm | 1 +
simd/i386/jdcolext-mmx.asm | 1 +
simd/i386/jdcolext-sse2.asm | 1 +
simd/i386/jdmrgext-avx2.asm | 2 ++
simd/i386/jdmrgext-mmx.asm | 2 ++
simd/i386/jdmrgext-sse2.asm | 2 ++
simd/i386/jdsample-avx2.asm | 4 ++++
simd/i386/jdsample-mmx.asm | 4 ++++
simd/i386/jdsample-sse2.asm | 4 ++++
simd/i386/jfdctflt-3dn.asm | 1 +
simd/i386/jfdctflt-sse.asm | 1 +
simd/i386/jfdctfst-mmx.asm | 1 +
simd/i386/jfdctfst-sse2.asm | 1 +
simd/i386/jfdctint-avx2.asm | 1 +
simd/i386/jfdctint-mmx.asm | 1 +
simd/i386/jfdctint-sse2.asm | 1 +
simd/i386/jidctflt-3dn.asm | 1 +
simd/i386/jidctflt-sse.asm | 1 +
simd/i386/jidctflt-sse2.asm | 1 +
simd/i386/jidctfst-mmx.asm | 1 +
simd/i386/jidctfst-sse2.asm | 1 +
simd/i386/jidctint-avx2.asm | 1 +
simd/i386/jidctint-mmx.asm | 1 +
simd/i386/jidctint-sse2.asm | 1 +
simd/i386/jidctred-mmx.asm | 2 ++
simd/i386/jidctred-sse2.asm | 2 ++
simd/i386/jquant-3dn.asm | 2 ++
simd/i386/jquant-mmx.asm | 2 ++
simd/i386/jquant-sse.asm | 2 ++
simd/i386/jquantf-sse2.asm | 2 ++
simd/i386/jquanti-avx2.asm | 2 ++
simd/i386/jquanti-sse2.asm | 2 ++
simd/nasm/jsimdext.inc | 8 ++++++++
simd/x86_64/jccolext-avx2.asm | 1 +
simd/x86_64/jccolext-sse2.asm | 1 +
simd/x86_64/jcgryext-avx2.asm | 1 +
simd/x86_64/jcgryext-sse2.asm | 1 +
simd/x86_64/jchuff-sse2.asm | 1 +
simd/x86_64/jcphuff-sse2.asm | 2 ++
simd/x86_64/jcsample-avx2.asm | 2 ++
simd/x86_64/jcsample-sse2.asm | 2 ++
simd/x86_64/jdcolext-avx2.asm | 1 +
simd/x86_64/jdcolext-sse2.asm | 1 +
simd/x86_64/jdmrgext-avx2.asm | 2 ++
simd/x86_64/jdmrgext-sse2.asm | 2 ++
simd/x86_64/jdsample-avx2.asm | 4 ++++
simd/x86_64/jdsample-sse2.asm | 4 ++++
simd/x86_64/jfdctflt-sse.asm | 1 +
simd/x86_64/jfdctfst-sse2.asm | 1 +
simd/x86_64/jfdctint-avx2.asm | 1 +
simd/x86_64/jfdctint-sse2.asm | 1 +
simd/x86_64/jidctflt-sse2.asm | 1 +
simd/x86_64/jidctfst-sse2.asm | 1 +
simd/x86_64/jidctint-avx2.asm | 1 +
simd/x86_64/jidctint-sse2.asm | 1 +
simd/x86_64/jidctred-sse2.asm | 2 ++
simd/x86_64/jquantf-sse2.asm | 2 ++
simd/x86_64/jquanti-avx2.asm | 2 ++
simd/x86_64/jquanti-sse2.asm | 2 ++
70 files changed, 116 insertions(+)
diff --git a/simd/i386/jccolext-avx2.asm b/simd/i386/jccolext-avx2.asm
index c46d684..7dc6e08 100644
--- a/simd/i386/jccolext-avx2.asm
+++ b/simd/i386/jccolext-avx2.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2)
EXTN(jsimd_rgb_ycc_convert_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jccolext-mmx.asm b/simd/i386/jccolext-mmx.asm
index 6357a42..8048abb 100644
--- a/simd/i386/jccolext-mmx.asm
+++ b/simd/i386/jccolext-mmx.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_mmx)
EXTN(jsimd_rgb_ycc_convert_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jccolext-sse2.asm b/simd/i386/jccolext-sse2.asm
index c6c8085..5307ddc 100644
--- a/simd/i386/jccolext-sse2.asm
+++ b/simd/i386/jccolext-sse2.asm
@@ -41,6 +41,7 @@
GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2)
EXTN(jsimd_rgb_ycc_convert_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jcgryext-avx2.asm b/simd/i386/jcgryext-avx2.asm
index 3fa7973..27a0e11 100644
--- a/simd/i386/jcgryext-avx2.asm
+++ b/simd/i386/jcgryext-avx2.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2)
EXTN(jsimd_rgb_gray_convert_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jcgryext-mmx.asm b/simd/i386/jcgryext-mmx.asm
index 8af42e5..dda0e05 100644
--- a/simd/i386/jcgryext-mmx.asm
+++ b/simd/i386/jcgryext-mmx.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_mmx)
EXTN(jsimd_rgb_gray_convert_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jcgryext-sse2.asm b/simd/i386/jcgryext-sse2.asm
index c9d6ff1..f8835bb 100644
--- a/simd/i386/jcgryext-sse2.asm
+++ b/simd/i386/jcgryext-sse2.asm
@@ -41,6 +41,7 @@
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2)
EXTN(jsimd_rgb_gray_convert_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jchuff-sse2.asm b/simd/i386/jchuff-sse2.asm
index 278cf5e..b16b974 100644
--- a/simd/i386/jchuff-sse2.asm
+++ b/simd/i386/jchuff-sse2.asm
@@ -349,6 +349,7 @@ times 1 << 14 db 15
GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2)
EXTN(jsimd_huff_encode_one_block_sse2):
+ _endbr32
%assign stack_offset 0
%define arg_state 4 + stack_offset
diff --git a/simd/i386/jcphuff-sse2.asm b/simd/i386/jcphuff-sse2.asm
index c26b48a..7fb01e5 100644
--- a/simd/i386/jcphuff-sse2.asm
+++ b/simd/i386/jcphuff-sse2.asm
@@ -281,6 +281,7 @@
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -460,6 +461,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jcsample-avx2.asm b/simd/i386/jcsample-avx2.asm
index 0a20802..46eba8c 100644
--- a/simd/i386/jcsample-avx2.asm
+++ b/simd/i386/jcsample-avx2.asm
@@ -43,6 +43,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2)
EXTN(jsimd_h2v1_downsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_downsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2)
EXTN(jsimd_h2v2_downsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jcsample-mmx.asm b/simd/i386/jcsample-mmx.asm
index 2c223ee..b2b8ded 100644
--- a/simd/i386/jcsample-mmx.asm
+++ b/simd/i386/jcsample-mmx.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_downsample_mmx)
EXTN(jsimd_h2v1_downsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -185,6 +186,7 @@ EXTN(jsimd_h2v1_downsample_mmx):
GLOBAL_FUNCTION(jsimd_h2v2_downsample_mmx)
EXTN(jsimd_h2v2_downsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jcsample-sse2.asm b/simd/i386/jcsample-sse2.asm
index 4fea60d..4c22b40 100644
--- a/simd/i386/jcsample-sse2.asm
+++ b/simd/i386/jcsample-sse2.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2)
EXTN(jsimd_h2v1_downsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -198,6 +199,7 @@ EXTN(jsimd_h2v1_downsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2)
EXTN(jsimd_h2v2_downsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jdcolext-avx2.asm b/simd/i386/jdcolext-avx2.asm
index 015be04..b076765 100644
--- a/simd/i386/jdcolext-avx2.asm
+++ b/simd/i386/jdcolext-avx2.asm
@@ -43,6 +43,7 @@
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2)
EXTN(jsimd_ycc_rgb_convert_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jdcolext-mmx.asm b/simd/i386/jdcolext-mmx.asm
index 5813cfc..150f5b6 100644
--- a/simd/i386/jdcolext-mmx.asm
+++ b/simd/i386/jdcolext-mmx.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_mmx)
EXTN(jsimd_ycc_rgb_convert_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jdcolext-sse2.asm b/simd/i386/jdcolext-sse2.asm
index d5572b3..cd3ac70 100644
--- a/simd/i386/jdcolext-sse2.asm
+++ b/simd/i386/jdcolext-sse2.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2)
EXTN(jsimd_ycc_rgb_convert_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jdmrgext-avx2.asm b/simd/i386/jdmrgext-avx2.asm
index e35f728..0db0aa4 100644
--- a/simd/i386/jdmrgext-avx2.asm
+++ b/simd/i386/jdmrgext-avx2.asm
@@ -43,6 +43,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2)
EXTN(jsimd_h2v1_merged_upsample_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -523,6 +524,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2)
EXTN(jsimd_h2v2_merged_upsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jdmrgext-mmx.asm b/simd/i386/jdmrgext-mmx.asm
index eb3e36b..6427a1a 100644
--- a/simd/i386/jdmrgext-mmx.asm
+++ b/simd/i386/jdmrgext-mmx.asm
@@ -40,6 +40,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_mmx)
EXTN(jsimd_h2v1_merged_upsample_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -408,6 +409,7 @@ EXTN(jsimd_h2v1_merged_upsample_mmx):
GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_mmx)
EXTN(jsimd_h2v2_merged_upsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jdmrgext-sse2.asm b/simd/i386/jdmrgext-sse2.asm
index c113dc4..6897fa1 100644
--- a/simd/i386/jdmrgext-sse2.asm
+++ b/simd/i386/jdmrgext-sse2.asm
@@ -42,6 +42,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2)
EXTN(jsimd_h2v1_merged_upsample_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -465,6 +466,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2)
EXTN(jsimd_h2v2_merged_upsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jdsample-avx2.asm b/simd/i386/jdsample-avx2.asm
index a800c35..7d52708 100644
--- a/simd/i386/jdsample-avx2.asm
+++ b/simd/i386/jdsample-avx2.asm
@@ -60,6 +60,7 @@ PW_EIGHT times 16 dw 8
GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2)
EXTN(jsimd_h2v1_fancy_upsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
pushpic ebx
@@ -227,6 +228,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2)
EXTN(jsimd_h2v2_fancy_upsample_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -570,6 +572,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2)
EXTN(jsimd_h2v1_upsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -669,6 +672,7 @@ EXTN(jsimd_h2v1_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2)
EXTN(jsimd_h2v2_upsample_avx2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jdsample-mmx.asm b/simd/i386/jdsample-mmx.asm
index 12c49f0..7f2ab40 100644
--- a/simd/i386/jdsample-mmx.asm
+++ b/simd/i386/jdsample-mmx.asm
@@ -59,6 +59,7 @@ PW_EIGHT times 4 dw 8
GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_mmx)
EXTN(jsimd_h2v1_fancy_upsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
pushpic ebx
@@ -217,6 +218,7 @@ EXTN(jsimd_h2v1_fancy_upsample_mmx):
GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_mmx)
EXTN(jsimd_h2v2_fancy_upsample_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -541,6 +543,7 @@ EXTN(jsimd_h2v2_fancy_upsample_mmx):
GLOBAL_FUNCTION(jsimd_h2v1_upsample_mmx)
EXTN(jsimd_h2v1_upsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -640,6 +643,7 @@ EXTN(jsimd_h2v1_upsample_mmx):
GLOBAL_FUNCTION(jsimd_h2v2_upsample_mmx)
EXTN(jsimd_h2v2_upsample_mmx):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jdsample-sse2.asm b/simd/i386/jdsample-sse2.asm
index 4e28d2f..3311b25 100644
--- a/simd/i386/jdsample-sse2.asm
+++ b/simd/i386/jdsample-sse2.asm
@@ -59,6 +59,7 @@ PW_EIGHT times 8 dw 8
GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2)
EXTN(jsimd_h2v1_fancy_upsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
pushpic ebx
@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2)
EXTN(jsimd_h2v2_fancy_upsample_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -538,6 +540,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2)
EXTN(jsimd_h2v1_upsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
@@ -635,6 +638,7 @@ EXTN(jsimd_h2v1_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2)
EXTN(jsimd_h2v2_upsample_sse2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jfdctflt-3dn.asm b/simd/i386/jfdctflt-3dn.asm
index 322ab16..109e36e 100644
--- a/simd/i386/jfdctflt-3dn.asm
+++ b/simd/i386/jfdctflt-3dn.asm
@@ -56,6 +56,7 @@ PD_1_306 times 2 dd 1.306562964876376527856643
GLOBAL_FUNCTION(jsimd_fdct_float_3dnow)
EXTN(jsimd_fdct_float_3dnow):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jfdctflt-sse.asm b/simd/i386/jfdctflt-sse.asm
index 86952c6..b1e0576 100644
--- a/simd/i386/jfdctflt-sse.asm
+++ b/simd/i386/jfdctflt-sse.asm
@@ -67,6 +67,7 @@ PD_1_306 times 4 dd 1.306562964876376527856643
GLOBAL_FUNCTION(jsimd_fdct_float_sse)
EXTN(jsimd_fdct_float_sse):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jfdctfst-mmx.asm b/simd/i386/jfdctfst-mmx.asm
index 80645a5..be84fdb 100644
--- a/simd/i386/jfdctfst-mmx.asm
+++ b/simd/i386/jfdctfst-mmx.asm
@@ -81,6 +81,7 @@ PW_F1306 times 4 dw F_1_306 << CONST_SHIFT
GLOBAL_FUNCTION(jsimd_fdct_ifast_mmx)
EXTN(jsimd_fdct_ifast_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jfdctfst-sse2.asm b/simd/i386/jfdctfst-sse2.asm
index 446fa7a..945f9cf 100644
--- a/simd/i386/jfdctfst-sse2.asm
+++ b/simd/i386/jfdctfst-sse2.asm
@@ -82,6 +82,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2)
EXTN(jsimd_fdct_ifast_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jfdctint-avx2.asm b/simd/i386/jfdctint-avx2.asm
index 23cf733..56acb63 100644
--- a/simd/i386/jfdctint-avx2.asm
+++ b/simd/i386/jfdctint-avx2.asm
@@ -260,6 +260,7 @@ PW_1_NEG1 times 8 dw 1
GLOBAL_FUNCTION(jsimd_fdct_islow_avx2)
EXTN(jsimd_fdct_islow_avx2):
+ _endbr32
push ebp
mov ebp, esp
pushpic ebx
diff --git a/simd/i386/jfdctint-mmx.asm b/simd/i386/jfdctint-mmx.asm
index 34a43b9..4d1e773 100644
--- a/simd/i386/jfdctint-mmx.asm
+++ b/simd/i386/jfdctint-mmx.asm
@@ -102,6 +102,7 @@ PW_DESCALE_P2X times 4 dw 1 << (PASS1_BITS - 1)
GLOBAL_FUNCTION(jsimd_fdct_islow_mmx)
EXTN(jsimd_fdct_islow_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jfdctint-sse2.asm b/simd/i386/jfdctint-sse2.asm
index 6f8e18c..3954c8f 100644
--- a/simd/i386/jfdctint-sse2.asm
+++ b/simd/i386/jfdctint-sse2.asm
@@ -103,6 +103,7 @@ PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS - 1)
GLOBAL_FUNCTION(jsimd_fdct_islow_sse2)
EXTN(jsimd_fdct_islow_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctflt-3dn.asm b/simd/i386/jidctflt-3dn.asm
index 8795191..eb49902 100644
--- a/simd/i386/jidctflt-3dn.asm
+++ b/simd/i386/jidctflt-3dn.asm
@@ -65,6 +65,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_float_3dnow)
EXTN(jsimd_idct_float_3dnow):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctflt-sse.asm b/simd/i386/jidctflt-sse.asm
index b27ecfd..ffe54f8 100644
--- a/simd/i386/jidctflt-sse.asm
+++ b/simd/i386/jidctflt-sse.asm
@@ -75,6 +75,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_float_sse)
EXTN(jsimd_idct_float_sse):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctflt-sse2.asm b/simd/i386/jidctflt-sse2.asm
index c646eae..fd1fe35 100644
--- a/simd/i386/jidctflt-sse2.asm
+++ b/simd/i386/jidctflt-sse2.asm
@@ -75,6 +75,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_float_sse2)
EXTN(jsimd_idct_float_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctfst-mmx.asm b/simd/i386/jidctfst-mmx.asm
index 24622d4..00940b8 100644
--- a/simd/i386/jidctfst-mmx.asm
+++ b/simd/i386/jidctfst-mmx.asm
@@ -96,6 +96,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_ifast_mmx)
EXTN(jsimd_idct_ifast_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctfst-sse2.asm b/simd/i386/jidctfst-sse2.asm
index 19704ff..1f4af33 100644
--- a/simd/i386/jidctfst-sse2.asm
+++ b/simd/i386/jidctfst-sse2.asm
@@ -94,6 +94,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_ifast_sse2)
EXTN(jsimd_idct_ifast_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctint-avx2.asm b/simd/i386/jidctint-avx2.asm
index 199c7df..2eb606a 100644
--- a/simd/i386/jidctint-avx2.asm
+++ b/simd/i386/jidctint-avx2.asm
@@ -296,6 +296,7 @@ PW_1_NEG1 times 8 dw 1
GLOBAL_FUNCTION(jsimd_idct_islow_avx2)
EXTN(jsimd_idct_islow_avx2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctint-mmx.asm b/simd/i386/jidctint-mmx.asm
index f15c8d3..2d91b7e 100644
--- a/simd/i386/jidctint-mmx.asm
+++ b/simd/i386/jidctint-mmx.asm
@@ -109,6 +109,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_islow_mmx)
EXTN(jsimd_idct_islow_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctint-sse2.asm b/simd/i386/jidctint-sse2.asm
index 43e3201..804be19 100644
--- a/simd/i386/jidctint-sse2.asm
+++ b/simd/i386/jidctint-sse2.asm
@@ -107,6 +107,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_islow_sse2)
EXTN(jsimd_idct_islow_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
diff --git a/simd/i386/jidctred-mmx.asm b/simd/i386/jidctred-mmx.asm
index e2307e1..cb43106 100644
--- a/simd/i386/jidctred-mmx.asm
+++ b/simd/i386/jidctred-mmx.asm
@@ -117,6 +117,7 @@ PB_CENTERJSAMP times 8 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_4x4_mmx)
EXTN(jsimd_idct_4x4_mmx):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -504,6 +505,7 @@ EXTN(jsimd_idct_4x4_mmx):
GLOBAL_FUNCTION(jsimd_idct_2x2_mmx)
EXTN(jsimd_idct_2x2_mmx):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jidctred-sse2.asm b/simd/i386/jidctred-sse2.asm
index 6e56494..2a61b9e 100644
--- a/simd/i386/jidctred-sse2.asm
+++ b/simd/i386/jidctred-sse2.asm
@@ -115,6 +115,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_4x4_sse2)
EXTN(jsimd_idct_4x4_sse2):
+ _endbr32
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
@@ -425,6 +426,7 @@ EXTN(jsimd_idct_4x4_sse2):
GLOBAL_FUNCTION(jsimd_idct_2x2_sse2)
EXTN(jsimd_idct_2x2_sse2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
diff --git a/simd/i386/jquant-3dn.asm b/simd/i386/jquant-3dn.asm
index 5cb60ca..a0599eb 100644
--- a/simd/i386/jquant-3dn.asm
+++ b/simd/i386/jquant-3dn.asm
@@ -36,6 +36,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_float_3dnow)
EXTN(jsimd_convsamp_float_3dnow):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_3dnow):
GLOBAL_FUNCTION(jsimd_quantize_float_3dnow)
EXTN(jsimd_quantize_float_3dnow):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jquant-mmx.asm b/simd/i386/jquant-mmx.asm
index 61305c6..080021b 100644
--- a/simd/i386/jquant-mmx.asm
+++ b/simd/i386/jquant-mmx.asm
@@ -36,6 +36,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_mmx)
EXTN(jsimd_convsamp_mmx):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -145,6 +146,7 @@ EXTN(jsimd_convsamp_mmx):
GLOBAL_FUNCTION(jsimd_quantize_mmx)
EXTN(jsimd_quantize_mmx):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jquant-sse.asm b/simd/i386/jquant-sse.asm
index 218adc9..cacd2a9 100644
--- a/simd/i386/jquant-sse.asm
+++ b/simd/i386/jquant-sse.asm
@@ -36,6 +36,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_float_sse)
EXTN(jsimd_convsamp_float_sse):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_sse):
GLOBAL_FUNCTION(jsimd_quantize_float_sse)
EXTN(jsimd_quantize_float_sse):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jquantf-sse2.asm b/simd/i386/jquantf-sse2.asm
index a881ab5..6f4789c 100644
--- a/simd/i386/jquantf-sse2.asm
+++ b/simd/i386/jquantf-sse2.asm
@@ -36,6 +36,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_float_sse2)
EXTN(jsimd_convsamp_float_sse2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -115,6 +116,7 @@ EXTN(jsimd_convsamp_float_sse2):
GLOBAL_FUNCTION(jsimd_quantize_float_sse2)
EXTN(jsimd_quantize_float_sse2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jquanti-avx2.asm b/simd/i386/jquanti-avx2.asm
index 5ed6bec..efcddd2 100644
--- a/simd/i386/jquanti-avx2.asm
+++ b/simd/i386/jquanti-avx2.asm
@@ -37,6 +37,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_avx2)
EXTN(jsimd_convsamp_avx2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -130,6 +131,7 @@ EXTN(jsimd_convsamp_avx2):
GLOBAL_FUNCTION(jsimd_quantize_avx2)
EXTN(jsimd_quantize_avx2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/i386/jquanti-sse2.asm b/simd/i386/jquanti-sse2.asm
index 0a50940..98d39e0 100644
--- a/simd/i386/jquanti-sse2.asm
+++ b/simd/i386/jquanti-sse2.asm
@@ -36,6 +36,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_sse2)
EXTN(jsimd_convsamp_sse2):
+ _endbr32
push ebp
mov ebp, esp
push ebx
@@ -121,6 +122,7 @@ EXTN(jsimd_convsamp_sse2):
GLOBAL_FUNCTION(jsimd_quantize_sse2)
EXTN(jsimd_quantize_sse2):
+ _endbr32
push ebp
mov ebp, esp
; push ebx ; unused
diff --git a/simd/nasm/jsimdext.inc b/simd/nasm/jsimdext.inc
index e8d50b0..f140d4d 100644
--- a/simd/nasm/jsimdext.inc
+++ b/simd/nasm/jsimdext.inc
@@ -512,6 +512,14 @@ const_base:
%endif
+%imacro _endbr32 0
+ dd 0xfb1e0ff3
+%endmacro
+
+%imacro _endbr64 0
+ dd 0xfa1e0ff3
+%endmacro
+
; --------------------------------------------------------------------------
; Defines picked up from the C headers
;
diff --git a/simd/x86_64/jccolext-avx2.asm b/simd/x86_64/jccolext-avx2.asm
index ffb527d..5c01670 100644
--- a/simd/x86_64/jccolext-avx2.asm
+++ b/simd/x86_64/jccolext-avx2.asm
@@ -40,6 +40,7 @@
GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2)
EXTN(jsimd_rgb_ycc_convert_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jccolext-sse2.asm b/simd/x86_64/jccolext-sse2.asm
index af70ed6..99c1889 100644
--- a/simd/x86_64/jccolext-sse2.asm
+++ b/simd/x86_64/jccolext-sse2.asm
@@ -39,6 +39,7 @@
GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2)
EXTN(jsimd_rgb_ycc_convert_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jcgryext-avx2.asm b/simd/x86_64/jcgryext-avx2.asm
index ddcc2c0..a5b9619 100644
--- a/simd/x86_64/jcgryext-avx2.asm
+++ b/simd/x86_64/jcgryext-avx2.asm
@@ -40,6 +40,7 @@
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2)
EXTN(jsimd_rgb_gray_convert_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jcgryext-sse2.asm b/simd/x86_64/jcgryext-sse2.asm
index f1d399a..550fc2f 100644
--- a/simd/x86_64/jcgryext-sse2.asm
+++ b/simd/x86_64/jcgryext-sse2.asm
@@ -39,6 +39,7 @@
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2)
EXTN(jsimd_rgb_gray_convert_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jchuff-sse2.asm b/simd/x86_64/jchuff-sse2.asm
index 9ea6df9..7e5ca30 100644
--- a/simd/x86_64/jchuff-sse2.asm
+++ b/simd/x86_64/jchuff-sse2.asm
@@ -259,6 +259,7 @@ times 1 << 15 db 16
GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2)
EXTN(jsimd_huff_encode_one_block_sse2):
+ _endbr64
%ifdef WIN64
diff --git a/simd/x86_64/jcphuff-sse2.asm b/simd/x86_64/jcphuff-sse2.asm
index 01b5c02..4625c11 100644
--- a/simd/x86_64/jcphuff-sse2.asm
+++ b/simd/x86_64/jcphuff-sse2.asm
@@ -281,6 +281,7 @@
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -449,6 +450,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jcsample-avx2.asm b/simd/x86_64/jcsample-avx2.asm
index b32527a..28bf70a 100644
--- a/simd/x86_64/jcsample-avx2.asm
+++ b/simd/x86_64/jcsample-avx2.asm
@@ -44,6 +44,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2)
EXTN(jsimd_h2v1_downsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -206,6 +207,7 @@ EXTN(jsimd_h2v1_downsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2)
EXTN(jsimd_h2v2_downsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jcsample-sse2.asm b/simd/x86_64/jcsample-sse2.asm
index 2fcfe45..2093090 100644
--- a/simd/x86_64/jcsample-sse2.asm
+++ b/simd/x86_64/jcsample-sse2.asm
@@ -43,6 +43,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2)
EXTN(jsimd_h2v1_downsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -188,6 +189,7 @@ EXTN(jsimd_h2v1_downsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2)
EXTN(jsimd_h2v2_downsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jdcolext-avx2.asm b/simd/x86_64/jdcolext-avx2.asm
index 2370fda..406fc01 100644
--- a/simd/x86_64/jdcolext-avx2.asm
+++ b/simd/x86_64/jdcolext-avx2.asm
@@ -41,6 +41,7 @@
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2)
EXTN(jsimd_ycc_rgb_convert_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jdcolext-sse2.asm b/simd/x86_64/jdcolext-sse2.asm
index e07c8d7..84acb50 100644
--- a/simd/x86_64/jdcolext-sse2.asm
+++ b/simd/x86_64/jdcolext-sse2.asm
@@ -40,6 +40,7 @@
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2)
EXTN(jsimd_ycc_rgb_convert_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jdmrgext-avx2.asm b/simd/x86_64/jdmrgext-avx2.asm
index 8b264b4..c42f395 100644
--- a/simd/x86_64/jdmrgext-avx2.asm
+++ b/simd/x86_64/jdmrgext-avx2.asm
@@ -41,6 +41,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2)
EXTN(jsimd_h2v1_merged_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -505,6 +506,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2)
EXTN(jsimd_h2v2_merged_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jdmrgext-sse2.asm b/simd/x86_64/jdmrgext-sse2.asm
index eb3ab9d..8347620 100644
--- a/simd/x86_64/jdmrgext-sse2.asm
+++ b/simd/x86_64/jdmrgext-sse2.asm
@@ -40,6 +40,7 @@
GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2)
EXTN(jsimd_h2v1_merged_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -447,6 +448,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2)
EXTN(jsimd_h2v2_merged_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jdsample-avx2.asm b/simd/x86_64/jdsample-avx2.asm
index 1e4979f..b80d607 100644
--- a/simd/x86_64/jdsample-avx2.asm
+++ b/simd/x86_64/jdsample-avx2.asm
@@ -61,6 +61,7 @@ PW_EIGHT times 16 dw 8
GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2)
EXTN(jsimd_h2v1_fancy_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -215,6 +216,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2)
EXTN(jsimd_h2v2_fancy_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -524,6 +526,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2)
EXTN(jsimd_h2v1_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -613,6 +616,7 @@ EXTN(jsimd_h2v1_upsample_avx2):
GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2)
EXTN(jsimd_h2v2_upsample_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jdsample-sse2.asm b/simd/x86_64/jdsample-sse2.asm
index 38dbcee..6a1e012 100644
--- a/simd/x86_64/jdsample-sse2.asm
+++ b/simd/x86_64/jdsample-sse2.asm
@@ -60,6 +60,7 @@ PW_EIGHT times 8 dw 8
GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2)
EXTN(jsimd_h2v1_fancy_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -202,6 +203,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2)
EXTN(jsimd_h2v2_fancy_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -497,6 +499,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2)
EXTN(jsimd_h2v1_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -584,6 +587,7 @@ EXTN(jsimd_h2v1_upsample_sse2):
GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2)
EXTN(jsimd_h2v2_upsample_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jfdctflt-sse.asm b/simd/x86_64/jfdctflt-sse.asm
index ef27966..90d06eb 100644
--- a/simd/x86_64/jfdctflt-sse.asm
+++ b/simd/x86_64/jfdctflt-sse.asm
@@ -65,6 +65,7 @@ PD_1_306 times 4 dd 1.306562964876376527856643
GLOBAL_FUNCTION(jsimd_fdct_float_sse)
EXTN(jsimd_fdct_float_sse):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jfdctfst-sse2.asm b/simd/x86_64/jfdctfst-sse2.asm
index 2e1bfe6..5a74aaf 100644
--- a/simd/x86_64/jfdctfst-sse2.asm
+++ b/simd/x86_64/jfdctfst-sse2.asm
@@ -80,6 +80,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2)
EXTN(jsimd_fdct_ifast_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jfdctint-avx2.asm b/simd/x86_64/jfdctint-avx2.asm
index e56258b..2ac6d4f 100644
--- a/simd/x86_64/jfdctint-avx2.asm
+++ b/simd/x86_64/jfdctint-avx2.asm
@@ -260,6 +260,7 @@ PW_1_NEG1 times 8 dw 1
GLOBAL_FUNCTION(jsimd_fdct_islow_avx2)
EXTN(jsimd_fdct_islow_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jfdctint-sse2.asm b/simd/x86_64/jfdctint-sse2.asm
index ec1f383..0950825 100644
--- a/simd/x86_64/jfdctint-sse2.asm
+++ b/simd/x86_64/jfdctint-sse2.asm
@@ -101,6 +101,7 @@ PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS - 1)
GLOBAL_FUNCTION(jsimd_fdct_islow_sse2)
EXTN(jsimd_fdct_islow_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jidctflt-sse2.asm b/simd/x86_64/jidctflt-sse2.asm
index 60bf961..f04902a 100644
--- a/simd/x86_64/jidctflt-sse2.asm
+++ b/simd/x86_64/jidctflt-sse2.asm
@@ -76,6 +76,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_float_sse2)
EXTN(jsimd_idct_float_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jidctfst-sse2.asm b/simd/x86_64/jidctfst-sse2.asm
index cb97fdf..d004da9 100644
--- a/simd/x86_64/jidctfst-sse2.asm
+++ b/simd/x86_64/jidctfst-sse2.asm
@@ -95,6 +95,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_ifast_sse2)
EXTN(jsimd_idct_ifast_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jidctint-avx2.asm b/simd/x86_64/jidctint-avx2.asm
index ca7e317..5c65fa7 100644
--- a/simd/x86_64/jidctint-avx2.asm
+++ b/simd/x86_64/jidctint-avx2.asm
@@ -282,6 +282,7 @@ PW_1_NEG1 times 8 dw 1
GLOBAL_FUNCTION(jsimd_idct_islow_avx2)
EXTN(jsimd_idct_islow_avx2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
mov rbp, rsp ; rbp = aligned rbp
diff --git a/simd/x86_64/jidctint-sse2.asm b/simd/x86_64/jidctint-sse2.asm
index 7aa869b..a428c9e 100644
--- a/simd/x86_64/jidctint-sse2.asm
+++ b/simd/x86_64/jidctint-sse2.asm
@@ -108,6 +108,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_islow_sse2)
EXTN(jsimd_idct_islow_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
diff --git a/simd/x86_64/jidctred-sse2.asm b/simd/x86_64/jidctred-sse2.asm
index 4ece9d8..5fac624 100644
--- a/simd/x86_64/jidctred-sse2.asm
+++ b/simd/x86_64/jidctred-sse2.asm
@@ -116,6 +116,7 @@ PB_CENTERJSAMP times 16 db CENTERJSAMPLE
GLOBAL_FUNCTION(jsimd_idct_4x4_sse2)
EXTN(jsimd_idct_4x4_sse2):
+ _endbr64
push rbp
mov rax, rsp ; rax = original rbp
sub rsp, byte 4
@@ -414,6 +415,7 @@ EXTN(jsimd_idct_4x4_sse2):
GLOBAL_FUNCTION(jsimd_idct_2x2_sse2)
EXTN(jsimd_idct_2x2_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jquantf-sse2.asm b/simd/x86_64/jquantf-sse2.asm
index ab2e395..a260e32 100644
--- a/simd/x86_64/jquantf-sse2.asm
+++ b/simd/x86_64/jquantf-sse2.asm
@@ -37,6 +37,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_float_sse2)
EXTN(jsimd_convsamp_float_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -110,6 +111,7 @@ EXTN(jsimd_convsamp_float_sse2):
GLOBAL_FUNCTION(jsimd_quantize_float_sse2)
EXTN(jsimd_quantize_float_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jquanti-avx2.asm b/simd/x86_64/jquanti-avx2.asm
index 70fe811..c48c73f 100644
--- a/simd/x86_64/jquanti-avx2.asm
+++ b/simd/x86_64/jquanti-avx2.asm
@@ -38,6 +38,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_avx2)
EXTN(jsimd_convsamp_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -116,6 +117,7 @@ EXTN(jsimd_convsamp_avx2):
GLOBAL_FUNCTION(jsimd_quantize_avx2)
EXTN(jsimd_quantize_avx2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
diff --git a/simd/x86_64/jquanti-sse2.asm b/simd/x86_64/jquanti-sse2.asm
index 3ee4420..fb1b4ae 100644
--- a/simd/x86_64/jquanti-sse2.asm
+++ b/simd/x86_64/jquanti-sse2.asm
@@ -37,6 +37,7 @@
GLOBAL_FUNCTION(jsimd_convsamp_sse2)
EXTN(jsimd_convsamp_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
@@ -116,6 +117,7 @@ EXTN(jsimd_convsamp_sse2):
GLOBAL_FUNCTION(jsimd_quantize_sse2)
EXTN(jsimd_quantize_sse2):
+ _endbr64
push rbp
mov rax, rsp
mov rbp, rsp
--
2.31.1