aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/x86/avf_showcqt.asm
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2023-02-01 02:26:20 +0100
committerLynne <dev@lynne.ee>2023-02-01 04:23:55 +0100
commitbbe95f7353a972f28a48be8da883549f02c59e4b (patch)
tree08841c9da55e7f076f6046d1dbd70f49d74c0ec0 /libavfilter/x86/avf_showcqt.asm
parentfc9a3b584da3cf3fc1f00036be2eaf5dff903ccf (diff)
downloadffmpeg-bbe95f7353a972f28a48be8da883549f02c59e4b.tar.gz
x86: replace explicit REP_RETs with RETs
From x86inc: > On AMD cpus <=K10, an ordinary ret is slow if it immediately follows either > a branch or a branch target. So switch to a 2-byte form of ret in that case. > We can automatically detect "follows a branch", but not a branch target. > (SSSE3 is a sufficient condition to know that your cpu doesn't have this problem.) x86inc can automatically determine whether to use REP_RET rather than REP in most of these cases, so impact is minimal. Additionally, a few REP_RETs were used unnecessary, despite the return being nowhere near a branch. The only CPUs affected were AMD K10s, made between 2007 and 2011, 16 years ago and 12 years ago, respectively. In the future, everyone involved with x86inc should consider dropping REP_RETs altogether.
Diffstat (limited to 'libavfilter/x86/avf_showcqt.asm')
-rw-r--r--libavfilter/x86/avf_showcqt.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/x86/avf_showcqt.asm b/libavfilter/x86/avf_showcqt.asm
index 63e58408cd..16af0de9b0 100644
--- a/libavfilter/x86/avf_showcqt.asm
+++ b/libavfilter/x86/avf_showcqt.asm
@@ -127,7 +127,7 @@ cglobal showcqt_cqt_calc, 5, 10, 12, dst, src, coeffs, len, fft_len, x, coeffs_v
lea dstq, [dstq + 16]
lea coeffsq, [coeffsq + 2*Coeffs.sizeof]
jnz .loop_k
- REP_RET
+ RET
align 16
.check_loop_a:
cmp xd, [coeffsq + Coeffs.len]
@@ -170,7 +170,7 @@ cglobal showcqt_cqt_calc, 4, 7, 8, dst, src, coeffs, len, x, coeffs_val, i
lea dstq, [dstq + 8]
lea coeffsq, [coeffsq + Coeffs.sizeof]
jnz .loop_k
- REP_RET
+ RET
%endif ; ARCH_X86_64
%endmacro ; DECLARE_CQT_CALC