]> git.sesse.net Git - x264/commitdiff
x86inc: warn if XOP integer FMA instruction emulation is impossible
authorAnton Mitrofanov <BugMaster@narod.ru>
Fri, 14 Feb 2014 11:53:58 +0000 (15:53 +0400)
committerFiona Glaser <fiona@x264.com>
Wed, 12 Mar 2014 04:10:23 +0000 (21:10 -0700)
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.

common/x86/x86inc.asm

index abeddf9e7f34e02089a7a79bcb7f87e7e55b9e61..7713bfa1f1c428e2ec87a518de5abe20af61af64 100644 (file)
@@ -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