diff mbox

[FFmpeg-devel,2/5] x86inc: Make REP_RET identical to RET in SSSE3+ functions

Message ID 20170608230502.29258-3-jdarnley@obe.tv
State Accepted
Commit 88dcdfad0964a954b6f185936c023dfd1c5d5e99
Headers show

Commit Message

James Darnley June 8, 2017, 11:04 p.m. UTC
From: Henrik Gramner <henrik@gramner.com>

There's no point in emitting a rep prefix before ret on modern CPUs.
---
 libavutil/x86/x86inc.asm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ronald S. Bultje June 9, 2017, 11:44 a.m. UTC | #1
Hi,

On Thu, Jun 8, 2017 at 7:04 PM, James Darnley <jdarnley@obe.tv> wrote:

> From: Henrik Gramner <henrik@gramner.com>
>
> There's no point in emitting a rep prefix before ret on modern CPUs.
> ---
>  libavutil/x86/x86inc.asm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


LGTM.

Ronald
diff mbox

Patch

diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index f2a6a3f1db..44069741cc 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -636,7 +636,7 @@  DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
 ; 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.)
 %macro REP_RET 0
-    %if has_epilogue
+    %if has_epilogue || cpuflag(ssse3)
         RET
     %else
         rep ret