aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/audiodsp.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 /libavcodec/x86/audiodsp.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 'libavcodec/x86/audiodsp.asm')
-rw-r--r--libavcodec/x86/audiodsp.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/x86/audiodsp.asm b/libavcodec/x86/audiodsp.asm
index f64077cb13..cf5baa9415 100644
--- a/libavcodec/x86/audiodsp.asm
+++ b/libavcodec/x86/audiodsp.asm
@@ -123,7 +123,7 @@ cglobal vector_clip_int32%5, 5,5,%1, dst, src, min, max, len
add dstq, mmsize*4*(%2+%3)
sub lend, mmsize*(%2+%3)
jg .loop
- REP_RET
+ RET
%endmacro
INIT_XMM sse2