[x264-devel] x86inc: warn if XOP integer FMA instruction emulation is impossible

Anton Mitrofanov git at videolan.org
Thu Mar 13 21:23:52 CET 2014


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Fri Feb 14 15:53:58 2014 +0400| [c7a7cc36958d663c4d32710f49ee3ea4b89749a4] | committer: Jason Garrett-Glaser

x86inc: warn if XOP integer FMA instruction emulation is impossible

Emulation requires a temporary register if arguments 1 and 4 are the same; this
doesn't obey the semantics of the original instruction, so we can't emulate
that in x86inc.

ffmpeg has an x86util emulation for that case; I'll add it if x264's asm ever
needs it.

Also add pmacsdql emulation.

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

 common/x86/x86inc.asm |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index e6f1647..c08bfc5 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -1385,15 +1385,18 @@ AVX_INSTR pfmul, 1, 0, 1
     %macro %1 4-7 %1, %2, %3
         %if cpuflag(xop)
             v%5 %1, %2, %3, %4
-        %else
+        %elifnidn %1, %4
             %6 %1, %2, %3
             %7 %1, %4
+        %else
+            %error non-xop emulation of ``%5 %1, %2, %3, %4'' is not supported
         %endif
     %endmacro
 %endmacro
 
-FMA_INSTR  pmacsdd,  pmulld, paddd
 FMA_INSTR  pmacsww,  pmullw, paddw
+FMA_INSTR  pmacsdd,  pmulld, paddd ; sse4 emulation
+FMA_INSTR pmacsdql,  pmuldq, paddq ; sse4 emulation
 FMA_INSTR pmadcswd, pmaddwd, paddd
 
 ; convert FMA4 to FMA3 if possible



More information about the x264-devel mailing list