[x264-devel] x86inc: Make REP_RET identical to RET in SSSE3+ functions

Henrik Gramner git at videolan.org
Mon May 22 00:00:59 CEST 2017


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Thu Apr 20 19:16:51 2017 +0200| [46a489b5e21cae3b4fea5d41cc285dcaf79d19e3] | committer: Henrik Gramner

x86inc: Make REP_RET identical to RET in SSSE3+ functions

There's no point in emitting a rep prefix before ret on modern CPUs.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=46a489b5e21cae3b4fea5d41cc285dcaf79d19e3
---

 common/x86/x86inc.asm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index 6c2edf9a..7c146e54 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -624,7 +624,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



More information about the x264-devel mailing list